问题描述
我最近将 Xcode 从 3.2 升级到 4.2.升级后,我无法在 iPhone 3 设备上测试我的应用程序,因为我的目标的构建设置"架构"项设置为 armv7.将架构"切换到 armv6 解决了该问题.
I recently upgraded Xcode from 3.2 to 4.2. After the upgrade I was having trouble testing my app on an iPhone 3 device because my target's "Build Settings" "Architectures" item was set to armv7. Switching "Architectures" to armv6 fixed the problem.
但这让我想到,我最好确保为我的 App Store 版本使用正确的设置,以便我的应用适用于使用 armv6 设备的人.
But this got me thinking that I better make sure I use the correct setting for my App Store version so that my app works for people using an armv6 device.
那么这只是将我的项目"的构建设置"架构"项也切换到 armv6 的问题,还是我需要做一些不同的事情?
So is it just a matter of switching my "Project"'s "Build Settings" "Architecture" item to armv6 as well or do I need to do something different?
我可以使用哪些设置来让 armv6 设备始终使用 armv6,并且让 armv7 设备始终使用 armv7?在测试期间以及我发布到应用商店的应用期间.
What settings can I use so that an armv6 device always uses armv6 and also so that an armv7 device always uses armv7? During both testing and for apps that I release to the app store.
推荐答案
要使 Xcode 生成适用于 armv6 和 armv7 设备的二进制文件,您应该设置以下内容构建设置:
To make Xcode generate a binary that works on armv6 and armv7 devices, you should set the following build settings:
- 架构:$(VALID_ARCHS)
- 有效架构:armv6 armv7(默认值)
- iOS 部署目标:iOS 4.2.1 或更低版本
- Architectures : $(VALID_ARCHS)
- Valid Architectures: armv6 armv7 (default value)
- iOS Deployment target : iOS 4.2.1 or lower
您还必须从 info.plist 文件中的必需设备功能中删除 armv7.
You also have to remove armv7 from Required Device Capabilities in the info.plist file.
这篇关于我应该使用哪些 Xcode 设置来支持 armv6 和 armv7?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!