When is it necessary to compile for i386 on iOS When is it necessary to compile for i386 on iOS xcode xcode

When is it necessary to compile for i386 on iOS


The i386 version is needed to run your application in the iOS simulator, which runs natively on OS X and uses the underlying x86/x64 hardware. This is way faster than emulating ARM.


You shouldn't need to specifically specify i386 in your architectures build setting. Ideally, you should just leave ARCHS and VALID_ARCHS as default values and everything should "just work". You will only see the arm architectures listed, but the right thing happens behind the scenes when building for the sim.

When building for the simulator, your project will be built for i386, x86_64, or both (depending on the deployment target and the ARCHS and ONLY_ACTIVE_ARCH build settings). In the simulator, 32bit devices are only allowed to run i386 code, and 64bit devices are able to run both i386 and x86_64b code (just like real devices but using intel instead of arm).