I have been using Dropbox Core API in my iOS app for quite a while now. After updating to Xcode 7 I received the following error when I try to compile my project:
ld: '.../Frameworks/Dropbox/iOS/DropboxSDK.framework/DropboxSDK' 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.
Since I asked this question I simply set the option
Enable Bitcode to
No in the targets
Build Settings while using
Yes in the Widget and Apple Watch targets. That worked just fine and I did not notice any problems or limitations.
Now I tried to release a new version of my app to the App Store and I noticed a check box
Include Bitcode when uploading the app file to Apple. When this check box is enabled I receive the following error:
Invalid Match-O Format. The Match-O bundle "MyApp.app/PlugIns/MyApp WatchKit Extension.appex" isn't consistent with the Match-O in the main bundle.
The main bundle Match-O contains armv7(machine code) and arm64(machine code), while the nested bundle Match-O contains armv7(bitcode and machine code) and arm64(bitcode and machine code).
Varify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build setting.
I have no idea why this is a problem now while all other version I uploaded during the last year passed without any problem. However the problem can easily be solved by un-checking the
Include Bitcode check box. The upload is then accepted without any problem.
But there is a better solution: As Greg pointed out, Dropbox finally released a Bitcode enabled version of the SDK!
Download the new SDK 1.3.14, include it in your project and set
Yes for all targets, and you are done. At least until Apple finds a new way to disturb your release workflow :-)