Bitcode is an intermediate representation of a compiled binary. Including bitcode will allow Apple to reoptimize your app binary in the future without the need for you to submit a new version of your app to the store. PSPDFKit for iOS has been built with bitcode since version 5. Bitcode is also one of the largest factors in the size of our SDK.
If you inspect the XCFramework’s contents, you’ll see several directories that contain framework builds for different architectures. The presence of a
BCSymbolMaps directory inside the framework for a particular architecture indicates that that architecture supports bitcode. For example, the presence of
PSPDFKit.xcframework/ios-arm64/PSPDFKit.framework/BCSymbolMaps signifies that the 64-bit ARM architecture of PSPDFKit supports bitcode.
Xcode 7.2 added a new tool called
bitcode_strip to remove bitcode chunks from binaries:
$ xcrun bitcode_strip -r PSPDFKit -o PSPDFKit
Removing bitcode will disallow Apple from running binary optimizations on your behalf. You can verify that the removal worked by checking the file size — which should be significantly smaller than the original file — or by using
otool as shown above.
BCSymbolMap is a lot like a dSYM for bitcode. Xcode builds it both as part of creating the app binary and for every dynamic framework. It’s required for resymbolicating function/method names to understand crashes. Symbol maps are per architecture, so there are currently two (ARMv7 and 64-bit ARM) in PSPDFKit. You can learn more in the Framework Size guide.