Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics libAdIdAccess.a does not contain bitcode

Xcode 7 beta 3 just installed some "additional components" (now Version 7.0 beta 3 (7A152u)), and now I'm getting a compiler error:

ld: '/<abbreviated>/Vendor/Analytics/GoogleAnalytics/libAdIdAccess.a(TAGActualAdIdAccess.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 armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) 

This Google Code post is the only mention I've found for GA and bitcode.

It would be nice if I could disable it for this library only rather than disable bitcode entirely. Is that possible?

This answer provides a work around for bitcode being enabled by default, and this may ultimately be a dupe of that more generic question.

like image 309
bdalziel Avatar asked Jul 13 '15 23:07

bdalziel


People also ask

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 enable Bitcode?

Bitcode is file that can be available to iTunes connect and they can use it to recompile with the updated clang compiler. 47.

Why should I enable Bitcode?

Bitcode-enabled builds When this option is disabled, the compiler generates an executable file that only contains machine code. But when it is enabled, the bitcode is included in the executable file alongside the generated machine code.


1 Answers

Update:

Good news everyone!

Google Analytics now supports Bitcode with their 3.14 release. You can grab it from their download sources, however its not listed on Cocoapods yet.

Google Analytics SDK Download

Change Log

Original:

Google needs to compile their analytics SDK into a bitcode library. However, from previous experience with Google updating their libraries to 64-bit it took over half a year iirc.

My advice is if you're not supporting watchOS we can just wait it out, got to

  1. Build Settings

  2. Enable Bitcode

  3. Set to No

If you are supporting watchOS, use a different analytics tool for now.

Extra info:

There's developers talking about it on a google forum here: https://groups.google.com/forum/#!topic/ga-mobile-app-analytics/d6ML4BKBBeY

Facebook and Fabric.io (Crashlytics, TwitterKit) have already updated to use bitcode, so it technically shouldn't be too difficult for Google to follow suit. I believe this type of holdback to be politics. The ones who have the most to lose are our users.

like image 77
David Wong Avatar answered Oct 13 '22 06:10

David Wong