Adding Google_analytics for iOS doesn't work many times?

Hi, I am getting the following error and still cannot fix it.

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_GAI", referenced from: objc-class-ref in AppDelegate.o objc-class-ref in HomeViewController.o "_OBJC_CLASS_$_GAITrackedViewController", referenced from: _OBJC_CLASS_$_HomeViewController in HomeViewController.o "_OBJC_METACLASS_$_GAITrackedViewController", referenced from: _OBJC_METACLASS_$_HomeViewController in HomeViewController.o ld: symbol(s) not found for architecture x86_64 

Any help would be greatly appreciated. Thanks in advance!

+7
symbols ios undefined architecture analytics
source share
3 answers

I had the same problem until I added libGoogleAnalyticsServices.a and libsqlite3.0.dylib to the link "Linking binaries to libraries"

Here is my complete list:

enter image description here

+17
source share

I tried to reproduce the problem you encountered and ended up with the same error you received. But I was able to fix it. What I did, I added the libGoogleAnalyticsServices.a file from the SDK folder to my project. Then I added libsqlite3.0.dylib to the Binary With Libraries link on the Build Phases tab. It worked !!!!

PS: Make sure you add all the headers and frames mentioned in your project. The key should include libGoogleAnalyticsServices.a and libsqlite3.0.dylib .

+11
source share

The suggestion here helped me add libGoogleAnalyticsServices.a and libsqlite3.0.dylib. I am building a quick project and will answer answer 1 if I had privileges.

+1
source share

All Articles