Arti Arti - 4 days ago 6
iOS Question

Undefined symbols for architecture armv7: "_OBJC_CLASS_$_GGLContext", referenced from: objc-class-ref in AppDelegate.o

I am trying to add Google Analytics in my iSO app and I am using Google Analytics latest SDK
https://developers.google.com/analytics/devguides/collection/ios/v3/.

Added all required header and frameworks to my project successfully. But while running my app I am getting below errors


  1. (null): "_OBJC_CLASS_$_GGLContext", referenced from:objc-class-ref in AppDelegate.o

  2. (null): Linker command failed with exit code 1 (use -v to see invocation)



Below is the code which I am writtig in AppDelegate.m file

// Configure tracker from GoogleService-Info.plist.
NSError *configureError;
[[GGLContext sharedInstance] configureWithError:&configureError];
NSAssert(!configureError, @"Error configuring Google services: %@", configureError);

// Optional: configure GAI options.
GAI *gai = [GAI sharedInstance];
gai.trackUncaughtExceptions = YES; // report uncaught exceptions
gai.logger.logLevel = kGAILogLevelVerbose; // remove before app release


Also includes (_OBJC_CLASS_$_GIDSignInButton and _OBJC_CLASS_$_GIDSignIn)
Please tell what I am missing. Thanks in advance.

Answer

"The OPN [Debug] target overrides the OTHER_LDFLAGS build setting". This was the main issue. After adding $(inherited) in new line in other linker flags solved my issue.

Comments