3

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.

bneely
  • 9,083
  • 4
  • 38
  • 46
Ryan
  • 5,883
  • 13
  • 56
  • 93

2 Answers2

4

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.

sch
  • 27,436
  • 3
  • 68
  • 83
  • When you say "Required device capabilities" you mean the plist right(that was never in my plist)? Also, if you don't mind, what's the difference between the target build settings and the project build settings? thank you – Ryan Feb 25 '12 at 19:51
  • 1
    Yes, Required Device Capabilities is in the info.plist file, so you have nothing to change if it is not already there. Also, You can have multiple targets in a single project (Unit tests, Full/Lite targets, iPad/iPhone targets). So you can set the shared settings in **project settings** and the target specific settings in **target settings**. – sch Feb 25 '12 at 20:01
  • Thanks about the Required Device Capabilities! I was not aware of that and I just accidentally discovered that Xcode added that to my project info.plist. – MonsieurDart Mar 29 '12 at 15:23
0

Set the following build settings:

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

This will generate different optimized binaries for both architectures.

jupp0r
  • 4,502
  • 1
  • 27
  • 34