Google Analytics libAdIdAccess.a does not contain bitcode

可紊 提交于 2019-11-29 21:10:24

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.

Welcome back to 2013, as @david-wong mentioned, it took a year for Google to support arm64. Whenever Apple announces a change or requirement to the toolchain, it takes the Google ios SDK team years to update their static lib. Just to set your expectations, they just recently acknowledge that bitcode support is a "high priority" issue, even though app slicing/bitcode was announced on June 8th, 2015. If you're using GA in your main target, GA will prevent you from using the extremely valuable benefit of architecture slicing.

Disabling bitcode isn't a workaround, it's just disabling bitcode support. Hopefully someone managing GA sees this, and decides to makes ios a first class citizen.

Google have just updated the Google Analytics and Google Tag Manager SDKs (version 3.14) to support Bitcode, so you can update the libraries and compile your app using "Enable Bitcode - Yes" flag.

Download page

Direct link

Upgrade your GoogleAnalytics sdk using pod.

  1. Open terminal
  2. Go to your project directory
  3. pod init
  4. Open the pod file created in your project directory
  5. Write the following lines

    platform :ios, '10.0'
    
    target “GoogleAnalyticsTestApp” do
       pod 'GoogleAnalytics'
       pod 'GoogleIDFASupport'
    end
    

This will resolve the error. From the following links you can add Google's Api:

1.http://cocoapods.org/pods/GoogleAnalytics

2.http://developers.google.com/ios/guides/cocoapods

If you are using cocoapods, you can add this at the end of the Podfile:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ENABLE_BITCODE'] = 'NO'
        end
    end
end

This will recurse through all the pods and mark the ENABLE_BITCODE off. Naturally, you will not be able to compile for the watch / apple tv (as they require it on some versions).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!