Xcode building error: should include an armv6 architecture
Question: After upgrading to Xcode 4.2 SDK I ran into trouble of building distribution code including release and ad-hoc applications. I get this warning message: “warning: iPhone apps should include an armv6 architecture (current ARCHS = “armv7″)”. I selected Deployment target to 4.0. I am using Xcode 4.2. What to do?
Answer: You should do what this error message suggests:
1. In Xcode navigate to Build Settings and find Architectures group (it’s on the top, so hard to miss). Add armv6 to Architectures line. It should contain armv6, armv7 or Standard (armv6 armv7)
2. Set Base SDK to Latest iOS (currently set to iOS …)
3. Uncheck Build Active Architecture Only or set it to NO.
4. Valid Architectures must show armv6 armv7
When your project uses your own dependent libraries, build them with the same (correct) configuration.
- The pre-iOS 4.3 apps use the armv6 architecture. These apps are compatible with most of the iPhones and iPads on the market (3G, 3GS, 4, iPad 3.2, iPad 4.2). The iOS 4.3 and later versions use the armv6 or armv7 architectures for increased compatibility with all iOS devices coming to market. If you have a static library in your project you must be ready to build both versions.
- When your binary is built for multiple architectures and deployment target is 4.0+, in your info.plist the MinimumOSVersion key can be set to a value of at least 4.
- All binaries submitted for distribution through iTunes AppStore must contain at least an armv6 binary. Armv7-only binaries are not accepted unless the armv7 required device capability is also present in the info.plist UIRequiredDeviceCapabilities key.