Xcode 5 and iOS 7: Architecture and Valid architectures

Crazy Yoghurt picture Crazy Yoghurt · Sep 20, 2013 · Viewed 127.9k times · Source

I'm starting new project in Xcode 5. I want to develop application using iOS SDK 7 but with deployment target iOS 5.0. As soon as I create new project in Xcode and try to change deployment target to 5.0, I've got this message:

Applications including an arm64 slice are not compatible with versions of iOS
prior to 6.0
Adjust your Architectures build setting to not include arm64 in order to deploy
to releases prior to iOS 6.0.

So changed architectures to Standard (no 64bit). I compiles, runs but I do not really understand what just happend.

What's the difference between Architectures and Valid architectures settings in Xcode project Build Settings?
If I set Architectures to exclude 64-bit what happens when I run my app on 64-bit iPhone or iOS Simulator (I know it works, I'm just curious what hapens underneath)?
Can you explain big mess with new 64-bit architecture?

enter image description here

Answer

Anil Varghese picture Anil Varghese · Sep 20, 2013

Set the architecture in build setting to Standard architectures(armv7,armv7s)

enter image description here

iPhone 5S is powered by A7 64bit processor. From apple docs

Xcode can build your app with both 32-bit and 64-bit binaries included. This combined binary requires a minimum deployment target of iOS 7 or later.

Note: A future version of Xcode will let you create a single app that supports the 32-bit runtime on iOS 6 and later, and that supports the 64-bit runtime on iOS 7.

From the documentation what i understood is

  • Xcode can create both 64bit 32bit binaries for a single app but the deployment target should be iOS7. They are saying in future it will be iOS 6.0
  • 32 bit binary will work fine in iPhone 5S(64 bit processor).

Update (Xcode 5.0.1)
In Xcode 5.0.1 they added the support to create 64 bit binary for iOS 5.1.1 onwards.

Xcode 5.0.1 can build your app with both 32-bit and 64-bit binaries included. This combined binary requires a minimum deployment target of iOS 5.1.1 or later. The 64-bit binary runs only on 64-bit devices running iOS 7.0.3 and later.

Update (Xcode 5.1)
Xcode 5.1 made significant change in the architecture section. This answer will be a followup for you. Check this