【发布时间】:2015-06-29 06:10:37
【问题描述】:
我正在尝试在我的 iSO 应用中添加 Google Analytics,并且我正在使用 Google Analytics 最新的 SDK https://developers.google.com/analytics/devguides/collection/ios/v3/.
已成功将所有必需的标头和框架添加到我的项目中。但是在运行我的应用程序时,我遇到了以下错误
(null):“_OBJC_CLASS_$_GGLContext”,引用自:AppDelegate.o 中的objc-class-ref
(null):链接器命令失败,退出代码为 1(使用 -v 查看调用)
下面是我写在 AppDelegate.m 文件中的代码
// 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
还包括(_OBJC_CLASS_$_GIDSignInButton 和 _OBJC_CLASS_$_GIDSignIn) 请告诉我我错过了什么。提前致谢。
【问题讨论】:
-
您找到解决方案了吗?我也有同样的问题。
-
还没有。我尝试了以下答案,但对我来说没有任何效果。
-
解决了这个问题。看我的回答。我还添加了 libGGLCore.a 到 Link Binary with Libraries
标签: ios google-analytics xcode6 cocoapods