12

What is this selection for? I have the Architectures set to Optimized (armv6 armv7) so a fat binary should be getting build with both, right?

So why does this need to set this in the menu? What does it do?

3 Answers 3

11

Well mostly you do not need it, but even if you are building fat binaries you may not always be building both versions.

If you check the Build settings for the target there is an option in the Architectures section named "Build Active Architecture Only". I think by default this is selected when you are building for debug. The idea being that if you have armv6 device plugged in Xcode is smart enough to detect that and only build that version saving you some time.

Of course when you are building for distribution the option will not be checked to ensure you build for both architectures (not just the active one).

So I guess the short answer is that you do need to mess with it as Xcode will set it for you based on which device you have plugged in.

0
3

armv6 is compatible with all iPhone/iPod touch/iPad devices.

armv7 is for newer devices which support OpenGL ES 2.0, including iPhone 3GS, recent iPod touch and iPad devices.

2
  • Yeah, but what does this section do? If I'm building an Optimized binary with both armv6 and armv7, what does selecting the 'Active Architecture' do?
    – ACBurk
    Commented Apr 20, 2010 at 20:25
  • 1
    Active Architecture builds for the device you have plugged in exclusively (old iPhone will be Arm6 only, 3GS and iPad will be Arm7 only)
    – Till
    Commented Apr 20, 2010 at 22:33
1

Xcode detects which devices you have connected and will set the active architecture accordingly. So if you plug a 2nd generation iPod Touch into your computer Xcode should set the active architecture to armv6.

When you create a Distribution configuration for publishing to the App Store you should make sure this option is not set so that you build the fat universal binary

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.