Bitcode
0. Introduction to Bitcode
1. Build static library or framework via Xcode 7, while user build application using Xcode 7.
"The Xcode 7 build system defaults include enabling the Enable Bitcode build setting, but standard Debug
or Release builds do not include the full bitcode content in the built framework and library products.
To build framework and library products for distribution and ensure that the full bitcode content is included,
framework and library providers must:
- Ensure that the Enable Bitcode build setting is correct (
ENABLE_BITCODE=YES
). - Perform either an Archive build or an Install build to produce framework and library products for distribution." Ref[3.6]
2. Build static library or framework via Xcode 7, while user build application using Xcode 6.
"Framework and library providers need to include bitcode for Xcode 7 development, and Xcode 7 generates bitcode by default.
However, bitcode-enabled framework and library products do not work well with Xcode 6. If you still need to support Xcode 6 development,
you must produce an additional version of your products without bitcode.
To build a library without bitcode, either use Xcode 7 with the build setting Enable Bitcode disabled (ENABLE_BITCODE=NO
)
or use Xcode 6."
3. How to check whether the static library is built with bitcode enable?
"otool -l (.o or .a file)
and look for "__bitcode" section" Ref[3.7]
1 $ otool -l libXX.a | grep __bitcode
Reference
1. Here‘s how iOS 9 actually saves space on your iOS device
http://appadvice.com/appnn/2015/06/heres-how-ios-9-actually-saves-space-on-your-ios-device
2. “App thinning” will be a major boon for 8GB and 16GB iPhones and iPads (ToRead)
http://arstechnica.com/apple/2015/06/app-thinning-will-be-a-major-boon-for-8gb-and-16gb-iphones-and-ipads/
3. Bit Code
3.1 ATS and Bitcode in iOS 9
https://developer.ibm.com/mobilefirstplatform/2015/09/09/ats-and-bitcode-in-ios9/
3.2 Apple’s Bitcode Telegraphs Future CPU Plans (ToRead)
https://medium.com/@InertialLemon/apple-s-bitcode-telegraphs-future-cpu-plans-a7b90d326228
3.3 Bit Code in <<App Distribution Guide>>
https://developer.apple.com/library/prerelease/watchos/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html
3.4 LLVM Bitcode File Format
http://llvm.org/docs/BitCodeFormat.html
3.5 Apple’s biggest developer news at WWDC that nobody’s talking about: Bitcode
http://thenextweb.com/apple/2015/06/17/apples-biggest-developer-news-at-wwdc-that-nobodys-talking-about-bitcode/
3.6 Xcode Release Notes (Xcode 7)
Bitcode
3.7 How to check a static library is built contain bitcode?
http://stackoverflow.com/questions/32755775/how-to-check-a-static-library-is-built-contain-bitcode