I just downloaded Xcode 7 beta 4 and am trying to build my Swift 2.0 application but I am getting the following error which I can't figure out the solution to:
ld: warning: -weak_framework is treated as -framework when used with
-bitcode_bundle (Xcode setting ENABLE_BITCODE=YES). Weak linking may still happen based on availability mark-up in headers ld:
'path/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(GMSBillingPointRecorder.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 arm64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
Does anyone know how to fix this problem?
Best Answer
Setting ENABLE_BITCODE flag to NO solves the issue.
For those wondering if its safe to disable it. Yes it is.
As per Apple Doc
Bitcode is part of Apple's new effort for App thinning. At the time of this writing, it is optional but could potentially be required later on. I think Apple is giving the frameworks/libs communities time to adapt.
Edit: In Xcode 7 you upload your app to iTunes connect in an intermediate state called Bitcode. When users download your app, the App Store will automatically produce an optimized version of your app (i.e., 64-bit if needed) to match the device the user is using.
For now what we can do is to disable bitcode and wait for Google Maps SDK's update.
UPDATE
SDK 1.11.0 - now supports Bitcode
https://developers.google.com/maps/documentation/ios-sdk/releases?hl=en
Resources:
Impact of Xcode build options "Enable bitcode" Yes/No
https://developer.apple.com/library/prerelease/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html
https://www.hackingwithswift.com/ios9