Topic locked

IOS Bitcode support

March 4, 2016 - 1:15am #1

Hey vuforia developers, i am having a problem building the latest vuforia 5.0.10 on Unity 5.3.2f1 with the latest XCode 7.2. Xcode throws the following error message:


ld: '/Users/chorusmac/Desktop/BUILDS/GBTB/gbtb_160304/Libraries/Plugins/iOS/libQCARUnityPlayer.a(Tracker.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7


Apparently its because the libQCARUnityPlayer.a file is not build with bitcode enabled. I know that Vuforia is currently not compatible with Unity 5.3.2 and above but on the stickied thread it does not say anything about bitcode. Do you guys know about this problem and are working on enabling bitcode on your files? I am unable to downgrade to a older unity version as i need the bitcode option for my builds so that appstore does not bloat the final file size after going through their compression.

IOS Bitcode support

April 19, 2016 - 8:55pm #4

Bitcode is different than App Slicing, but both are components of App Thinning which is new with iOS 9 / Xcode 7.x:

See this Unity blog post for a good explanation on the App Slicing feature of iOS 9 and how to optimize Unity apps:

"There are two flavors of app slicing: app executable slicing and app resource slicing. The former refers to removal of unneeded executable code from the application bundle and is employed automatically on the App Store for all apps that target iOS/tvOS version 9.0 and higher. The latter refers to removal of unneeded assets and needs more developer effort in order to work. This is what we will cover in this blog post."

Also see Apple’s guide on App Thinning and its 3 different components (Slicing, Bitcode, and On-Demand Resources):

"Xcode simulates slicing during development so you can create and test variants locally. Xcode slices your app when you build and run your app on a device. When you create an archive, Xcode includes the full version of your app but allows you to export variants from the archive."

"Note: Sliced apps are supported on devices running 9.0 and later; otherwise, the store delivers universal apps to customers."

The libVuforia.a for iOS has 3 architecture slices included in it (armv7, armv7s, arm64). When you compile from Xcode 7.x to your device, only the architecture for that device will be included. You can test this by compiling the VuforiaSamples 5.5.9 sample app (16.6 MB uncompiled and w/o Vuforia library) to your device and you will see that its final size with the Vuforia library is around 22.4 MB (lookup app size in Settings) while the original libVuforia.a containing all 3 architectures is 33.4 MB. Note also that this slicing test in Xcode 7.2 is done with Bitcode disabled (Enable Bitcode = No) in the Build Settings.

Slicing tests using Xcode 7.2 and compiling builds directly to devices running iOS 9.2.1, 8.4, and 7.1.1 were successful, but note that according to Apple's docs (see quote above), the App Store will only support slicing on devices running iOS 9 and later.

You can view details of the Vuforia architecture slices in libVuforia.a (5.5.9) and their offsets using the following Xcode command-line utility:

xcrun -sdk iphoneos lipo -detailed_info libVuforia.a

The output will look something like this:

Fat header in: libVuforia.a
fat_magic 0xcafebabe
nfat_arch 3
architecture armv7
    cputype CPU_TYPE_ARM
    cpusubtype CPU_SUBTYPE_ARM_V7
    offset 68
    size 10692384
    align 2^2 (4)
architecture armv7s
    cputype CPU_TYPE_ARM
    cpusubtype CPU_SUBTYPE_ARM_V7S
    offset 10692452
    size 10822744
    align 2^2 (4)
architecture arm64
    cputype CPU_TYPE_ARM64
    cpusubtype CPU_SUBTYPE_ARM64_ALL
    offset 21515200
    size 11904336
    align 2^3 (8)

The different architecture sizes from the output above:

  • armv7 = 10.6 MB
  • armv7s = 10.8 MB
  • arm64 = 11.9 MB


IOS Bitcode support

April 3, 2016 - 11:54pm #3

Do you have a rough estimate when it will be out? Is it in the works? My app almost triples in size from 100 to 260mb when released on the app store with bitcode disabled.

IOS Bitcode support

March 4, 2016 - 2:12am #2

Bitcode is currently not supported in Vuforia, see existing thread:


Topic locked