views:

631

answers:

2

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?

alt text

+1  A: 

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.

Farcaller
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
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
+1  A: 

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.

kharrison
Thanks, that makes sense
ACBurk