3
votes

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.

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.

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?

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.

2

2 Answers

4
votes

To make Xcode generate a binary that works on armv6 and armv7 devices, you should set the following build settings:

  • Architectures : $(VALID_ARCHS)
  • Valid Architectures: armv6 armv7 (default value)
  • iOS Deployment target : iOS 4.2.1 or lower

You also have to remove armv7 from Required Device Capabilities in the info.plist file.

0
votes

Set the following build settings:

  • Valid Architectures: armv6 armv7
  • Architectures: Optimized (armv6 armv7)

This will generate different optimized binaries for both architectures.