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?
The Maps SDK for iOS uses a pay-as-you-go pricing model.
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 (iOS, watchOS)
Bitcode is an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the App Store. Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new version of your app to the store.
Xcode hides symbols generated during build time by default, so they are not readable by Apple. Only if you choose to include symbols when uploading your app to iTunes Connect would the symbols be sent to Apple. You must include symbols to receive crash reports from Apple.
Note: For iOS apps, bitcode is the default, but optional. If you provide bitcode, all apps and frameworks in the app bundle need to include bitcode. For watchOS apps, bitcode is required.
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
I changed the ENABLE_BITCODE Flag to No and compiled properly thanks @Visput for the answer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With