Linker errors when trying to install new Google Analytics 3.0 Beta

二次信任 提交于 2019-11-28 04:17:28

I had to add both libz.dylib and AdSupport.framework to the build phases to make this go away. Google doesn't include these in their instructions so going to check with them to make sure this is OK then will update this post.

UPDATE: Now you also need to add libsqlite3.0.dylib to get it to work.

I downloaded version 3.06 of the Google Analytics Services for iOS in early April 2014, and STILL ran into the problems referenced above. Google has updated their docs to mention the need to link the libz.dylib and the AdSupport.framework.

SOLUTION: I found through trial and error, I also needed to link the libsqlite3.dylib in order to build on the simulator or to a device.

Add

libz.dylib

AdSupport.framework

libsqlite3.0.dylib

Google did not update their guide as of 8 Oct 2013.

Google Analytics Guide is here

None of the above solutions worked for me. What did work for me, however, was adding these:

libz.dylib

libsqlite3.0.dylib

libGoogleAnalyticsServices.a

The libGoogleAnalyticsServices.a is a file that can be found in the download for Google Analytics for Mobile Apps iOS SDK v3.

Hope this helps!

I had libz.dylib and AdSupport.framework as per instruction from Google, it worked fine.

Then I had to add -all_load in other linker flags for some other library dependency, then google analytics started failing build with linker error.

I had to add libsqlite3.0.dylib framework to get it to work.

So there is something to do with -all_load linker flag

Till third party developers do not enable BITCODE for their old libraries, you can disable bit code in your own project if you are not going to have a Apple Watch extension for you application.

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