When I run through implementing Google Analytics in my app, using this walk through: http://code.google.com/mobile/articles/analytics_end_to_end.html
After adding the libGoogleAnalytics.a CFNetwork and libsqlite3.0.dylib frameworks, and added the GANTracker.h into my AppDelegate.m
I get this error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GANTracker", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and the app won't even compile. My app is aimed at iOS 5.0
I'm pretty stuck. Any advice or work throughs would be very highly appreciated.
Safari does not block Google Analytics by default With the “Privacy Report,” Apple added many new privacy features to help protect users from being tracked across the internet. In the presentation, Apple showed that Google Analytics was the most frequently blocked tracker.
As more information has surfaced, it appears that Intelligent Tracking Prevention (ITP) in Safari 14 is not completely blocking Google Analytics. Instead, it's blocking third-party tracking cookies and cross-site scripting requests, which limits portions of Google Analytics.
Use Tag Manager with Google Analytics and Firebase. To get the latest mobile app report features in Google Analytics, use Firebase in your Android and iOS apps. Once enabled in your app, Google Analytics will automatically collect and report on built-in events and user properties.
I was working on a Cordova based XCode project. And got stuck with these stupid errors before figuring out what the linking errors meant. So here is what you do..
First, make sure you follow the steps mentioned https://github.com/phonegap/phonegap-plugins/tree/master/iOS/GoogleAnalytics. Next make sure you have the following files under the project linked via Build Phases (You get that when you click on the project name.. figure it out)
Also make sure your Plugins folder has 2 files, GoogleAnalyticsPlugin.h and GoogleAnalyticsPlugin.m.
If that doesn't help resolve your bugs. Then God help you. Start praying. Or alternatively try a bug spray. See if that works.
I actually figured out the answer after posting the comment.
Click on your project in the "Project Navigator", then click on your project under "Targets". You then need to click on "Build Phases". You need to make sure libsqlite3.0dylib
and CFNetwork.framework
are added to the "Link Binary WIth Libraries". I had this, but what I didnt have was you also need to add libGoogleAnalytics.a
to that same area. That fixed the problem for me.
In my case, I add the AdSupport.framework for the missing "_OBJC_CLASS_$_ASIdentifierManager"
Just adding to the answer of @Etch.
Xcode 4.5 dropped armv6 and only supports armv7. Therefore, your lib might be an old version and you need to download version 1.5.1 onward. Download here
Issues: http://code.google.com/p/analytics-issues/issues/detail?id=232
I had the same issue. The solution was move the library to same level of .h files. But I don't know why this work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With