CPU Architectures

When building for the Cocoa platform, Elements allows you to choose to build for different CPU Architectures, depending on the target devices and operating system versions you wish to support. Elements allows the creation of so-called "Universal Binaries", or "Fat Binaries", that can include executable code for more than one platform (for example 32-bit and 64-bit).

When building for OS X, you can pick one set of architectures for your application (with currently only x86_64 being supported, i.e. 64-bit Intel-based Mac OS X). On iOS, in addition to picking architectures for the device deployment, you can also select separate architectures for running in the Simulator.

macOS

Only one architecture is supported as of now: 64-bit Intel, officially called x86_64 and sometimes also simply referred to as x64. Future versions of Elements and Mac OS X might add support for additional platforms (for example if Apple releases ARM-based Macs).

Elements does not support the 32-bit i386 architecture for Mac OS X, because the "Modern Objective-C Runtime", introduced with Mac OS X 10.5 Leopard, is not supported on 32-bit. The Modern Objective-C Runtime is a prerequisite for ARC, as well as many other runtime features Cocoa developers take for granted these days. Also, 32-bit Mac applications are largely irrelevant today.

iOS

On iOS, Elements supports three architectures for device deployment:

  • arm64 is the current 64-bit ARM CPU architecture, as used since the iPhone 5S and later (6, 6S, SE and 7), the iPad Air, Air 2 and Pro, with the A7 and later chips.
  • armv7s (a.k.a. Swift, not to be confused with the language of the same name), being used in Apple's A6 and A6X chips on iPhone 5, iPhone 5C and iPad 4.
  • armv7, an older variation of the 32-bit ARM CPU, as used in the A5 and earlier.

Very old iOS devices shipped before 2009 had armv6 CPUs, which are no longer supported by current iOS SDKs, nor by Elements.

In Project Settings, you can select to build your projects for one or more architectures. You can either choose architectures explicitly, or you can select Default, in which case no architectures will be hardcoded into the project settings, and the project will automatically be built against a default set of architectures. This is the most forward-thinking setting, since it will automatically include new architectures when you rebuild your project against newer SDKs.

  • arm64 is only available in iOS 7.0 or later.
  • armv7s is only available in iOS 6.0 or later.

Choose carefully when excluding architectures. An application build with armv7 will run on all current iOS devices, even those that support newer architectures (it will run as 32-bit on iPhone 5S and later). But on the other hand, an app build without armv7 will not run on older devices such as the iPhone 4/4S or the original iPad mini.

In addition to the device architecture, Project Settings will also let you choose architectures for the Simulators, where appropriate (i.e. on iOS).

  • i386 (i.e. 32-bit Intel) is the only option on iOS 6.1 and below.
  • x64_64 (i.e. 64-bit Intel) is optionally available starting with iOS 7.0.

Just as with the device architectures, a special Match Device option is provided for the Simulator Architectures. Selecting this option will once again not hardcode any architectures in the project; instead Elements will automatically pick the appropriate Simulator architectures, based on which device architectures you are building for. If your application includes armv7 and/or armv7s, it will include i386 in the Simulator architectures; if your are building for arm64 on the device, it will build for x86_64 on Simulator.

Just as on the device, Simulator builds can be Universal Binaries and include two (and potentially more, in the future) architectures. If built with both architectures, you can test your application in both 32-bit and 64-bit versions of the iOS Simulator, without needing to rebuild.

tvOS

On tvOS, Elements supports three architectures for device deployment:

  • arm64 is the current 64-bit ARM CPU architecture and used on Apple TV 4
  • x64_64 (i.e. 64-bit Intel) is used in the Simulator

watchOS

On tvOS, Elements supports three architectures for device deployment:

  • armv7k is a 32-bit variant of regular armv7, and used on Apple Watch Series 0, 1 and 2.
  • i386 (i.e. 32-bit Intel) is used in the Simulator