10
votes

This morning I got an e-mail from Apple saying the following:

Dear Developer,

As we announced in October, beginning February 1, 2015 new iOS apps submitted to the App Store must include 64-bit support and be built with the iOS 8 SDK. Beginning June 1, 2015 app updates will also need to follow the same requirements. To enable 64-bit in your project, we recommend using the default Xcode build setting of “Standard architectures” to build a single binary with both 32-bit and 64-bit code.

If you have any questions, visit the Apple Developer Forums.

Best regards, Apple Developer Technical Support

Now I have a question, how do you ensure that an iOS app IS 64bit compatible?

My build settings look like this: Architectures

My Deployment target is iOS 6.0.

I just need to confirm that the app is 64 bit compliant, I am all new to iOS and took over a fairly large project not long ago so I'd rather ask and be 100% sure.

Just to make things a bit clearer, how do you ensure that an iOS app is 64bit compatible? I know you need to set certain build rules such as the one in the image, but I want to know is there any way of knowing that your iOS app is 64 bit compliant. 32 bit iOS apps can run on 64bit hardware so I don't believe checking if the iOS app runs on a device will help.

I believe you could upload a new version and see if you get this message: But I was hoping for a nice option without uploading a new build. image

Thanks!

1
I'm not sure I understand the question. Can't you just test it on a 64-bit device to ensure it works? - Droppy
how do you ensure that an iOS app is 64bit compatible? I know you need to set certain build rules such as the one in the image, but I want to know is there any way of knowing that your iOS app is 64 bit compliant. - apmartin1991
It is building just fine, with no errors, it runs on all iPhones running iOS 6/7/8/8.1 But I just need to be 100% sure that it is 64 bit compliant. Just seeing if it compiles and works on phones isn't enough, because 32bit apps would work on a 64bit phone. - apmartin1991
Go to app archive or unpack your ipa, find binary and run file binary, you will see all archs inside. - Ben Affleck
Bear in mind that compiling for 64-bit is just the first step in 64-bit compatibility. You need to make sure you can read/write files or data between the 32-bit and 64-bit versions of your app. Apple have provided guides to assist you. See developer.apple.com/library/mac/documentation/Cocoa/Conceptual/… and developer.apple.com/library/ios/documentation/General/… - Robotic Cat

1 Answers

10
votes

With the settings you have you should end up with arm64 and armv7 in your binary. You won't get armv7s because although it's a valid architecture, it's not included in ARCHS_STANDARD if building on Xcode 6 (See also).

Just because it runs on a 64 bit device, it doesn't mean that it has 64-bit support. 64-bit devices can run 32-bit apps.

To determine whether or not it contains an arm64 chunk, you need to find the application. Go to Xcode preferences, and select the Locations tag. The Derived Data line tells you where files are being built.

XCode settings : Locations

Open up a Terminal (Finder->Applications->Utilities->Terminal) and go to that location using the 'cd' command. In my case, my project is stored in ~/MyProject

$ cd ~/MyProject
$ cd build
$ find . -name MyTarget
./build/MyTarget
./build/MyTarget/Build/Products/Debug-iphoneos/MyTarget.app/CoreControl
./build/MyTarget/Build/Products/Debug-iphoneos/MyTarget.app.dSYM/Contents/Resources/DWARF/CoreControl

Now we know where the binary is stored (it's the second result), we can check it to see what architectures it contains:

$ dwarfdump ./build/MyTarget/Build/Products/Debug-iphoneos/MyTarget.app/MyTarget
----------------------------------------------------------------------
 File: ./build/MyTarget/Build/Products/Debug-iphoneos/MyTarget.app/MyTarget (armv7)
----------------------------------------------------------------------
.debug_info contents:
< EMPTY >

In my case, I only have arm7 built, not arm64.