Breaking News
Home / iOS / iOS Isuses / Google Analytics Link Error in XCode

Google Analytics Link Error in XCode

Adding Google Analytic library to the iOS project, the XCode project does not build anymore. It fails with the following error:
Undefined symbols for architecture armv7:

  “_OBJC_CLASS_$_NSFetchRequest”, referenced from:

      objc-class-ref in libGoogleAnalytics.a(GAIDataStore.o)

  “_OBJC_CLASS_$_NSManagedObject”, referenced from:

      _OBJC_CLASS_$_GAIHit in libGoogleAnalytics.a(GAIHit.o)

      _OBJC_CLASS_$_GAIProperty in libGoogleAnalytics.a(GAIProperty.o)

  “_OBJC_CLASS_$_NSManagedObjectModel”, referenced from:

      objc-class-ref in libGoogleAnalytics.a(GAIDataStore.o)

  “_OBJC_CLASS_$_NSPersistentStoreCoordinator”, referenced from:

      objc-class-ref in libGoogleAnalytics.a(GAIDataStore.o)

  “_OBJC_CLASS_$_NSManagedObjectContext”, referenced from:

      objc-class-ref in libGoogleAnalytics.a(GAIDataStore.o)

  “_NSSQLiteErrorDomain”, referenced from:

      l003 in libGoogleAnalytics.a(GAIDataStore.o)<!>

Solution

The solution is very straight forward. The Google Analytic Framework relies on iOS CoreData Framework. So go into project and add the CoreData Framework and build again.

Google Analytic Xcode Link Error

[pb_builder]

Check Also

local variable ‘build_data’ referenced before assignment : TestFlight Error : Failed to upload build.

Scenario Trying to upload build to TestFlight fails in the end. Error local variable ‘build_data’ …

Advertisment ad adsense adlogger