Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New warnings in iOS 9: "all bitcode will be dropped"

I have this new warning about the Google Framework in my app:

(null): URGENT: all bitcode will be dropped because '/Users/myname/Library/Mobile Documents/com~apple~CloudDocs/foldername/appname/GoogleMobileAds.framework/GoogleMobileAds(GADSlot+AdEvents.o)' was built without 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. Note: This will be an error in the future.

Xcode 7 is giving me around 204 warnings about this same concept, and I could not get around with this. Also I have a problem accessing the network from my app. This is the error from the Debugging Area:

-canOpenURL: failed for URL: "kindle://home" - error: "This app is not allowed to query for scheme kindle"

All of these problems were not present in iOS 8.

like image 793
C.Farrugia Avatar asked Jun 15 '15 14:06

C.Farrugia


People also ask

Should I include Bitcode for iOS content?

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.

Is it safe to disable Bitcode?

If you turn BitCode on, then the intermediate representation of the compiled program gets uploaded and Apple will able to recompile and/or optimize your apps for future architectures (as described here). Turning it off is very safe for the time being.

What is iOS Bitcode?

Bitcode is an Apple technology that enables you to recompile your app to reduce its size. The recompilation happens when you upload your app to App Store Connect or export it for Ad Hoc, Development, or Enterprise distribution. To learn more about bitcode, see Distribution Options.

What is include Bitcode for iOS content?

Include bitcode for iOS content – Bitcode is an intermediate binary format introduced with iOS 9. By including the app in bitcode format, it can be compiled by Apple so that it is optimized for the full range of target iOS devices and to take advantage of future hardware and software advances.


2 Answers

Your library was compiled without bitcode, but the bitcode option is enabled in your project settings. Say NO to Enable Bitcode in your target Build Settings and the Library Build Settings to remove the warnings.

For those wondering if enabling bitcode is required:

For iOS apps, bitcode is the default, but optional. For watchOS and tvOS apps, bitcode is required. If you provide bitcode, all apps and frameworks in the app bundle (all targets in the project) need to include bitcode.

https://help.apple.com/xcode/mac/current/#/devbbdc5ce4f

like image 128
Zia Avatar answered Sep 21 '22 07:09

Zia


After Xcode 7, the bitcode option will be enabled by default. If your library was compiled without bitcode, but the bitcode option is enabled in your project settings, you can:

  1. Update your library with bit code,
  2. Say NO to Enable Bitcode in your target Build Settings

Enter image description here

And the Library Build Settings to remove the warnings.

For more information, go to documentation of bitcode in developer library.

And WWDC 2015 Session 102: "Platforms State of the Union"

Enter image description here

like image 23
ChenYilong Avatar answered Sep 25 '22 07:09

ChenYilong