Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics Library IOS

When i add google analytics library, i have this warning

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_NSAttributeDescription", referenced from:
      objc-class-ref in libGoogleAnalytics.a(GAICoreDataUtil.o)
      objc-class-ref in libGoogleAnalytics_debug.a(GAICoreDataUtil.o)
  "_OBJC_CLASS_$_NSFetchRequest", referenced from:
      objc-class-ref in libGoogleAnalytics.a(GAIDataStore.o)
      objc-class-ref in libGoogleAnalytics_debug.a(GAIDataStore.o)
  "_NSSQLiteErrorDomain", referenced from:
      l003 in libGoogleAnalytics.a(GAIDataStore.o)

Please help me

like image 763
user1781040 Avatar asked Oct 29 '12 10:10

user1781040


People also ask

Does Google Analytics work on iOS?

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. You can also log custom events and set custom user properties.

What is Google Analytics in Swift?

Google Analytics collects usage and behavior data for your web app. The SDK logs two primary types of information: Events: What is happening in your app, such as user actions, system events, or errors.


2 Answers

Add libGoogleAnalytics.a to your target setting [Build phases]-[Link Binary with Libraries]. Also check if libsqlite3.0dylib (where GA stores tracking data) and CFNetwork.framework are added there as they are required for Google Analytics/iOS (version 2.0 beta 3).

P.S. For Google Analytics/iOS version 3.0 CoreData framework is required instead.

like image 163
jki Avatar answered Oct 21 '22 23:10

jki


I had have the same issue on NSAttributeDescription. In documentation this function is from CoreData.framework, so I have added this framework and no more errors on that issue.

like image 35
plop91 Avatar answered Oct 22 '22 01:10

plop91