在将我的Fabric / Crashlytics SDK迁移到FirebaseCrashlytics时,我决定集成cocoapods。
在将FirebaseCrashlytics和FirebaseAnalytics添加到Podfile中之后,编译时出现此错误,但我不知道为什么会发生这种情况:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GSDK_GTMLogger", referenced from:
objc-class-ref in GoogleIPhoneUtilities(GIPReachability.o)
"_kFirebaseCloudMessagingErrorDomain", referenced from:
-[FIRMessaging(FIRApp) configureMessaging:] in FirebaseMessaging(FIRMessaging+FIRApp_ed2c92d2ac2b5969ab6c5684759ab5bd.o)
-[FIRMessaging(FIRApp) exitApp:withError:] in FirebaseMessaging(FIRMessaging+FIRApp_ed2c92d2ac2b5969ab6c5684759ab5bd.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我想念什么?
编辑:-我已经解决了FirebaseMessaging的第二个问题,对于我一生来说,我不知道为什么会有这个问题:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GSDK_GTMLogger", referenced from:
objc-class-ref in GoogleIPhoneUtilities(GIPReachability.o)
我现在使用的所有Firebase仓库现在都是通过Cocoapods设置的。
答案 0 :(得分:1)
该应用似乎将FirebaseMessaging的一个很旧的副本及其某些依赖项与最新版本的Analytics和Crashlytics链接在一起。
由于Firebase库共享依赖项,因此不可能混合使用不兼容的版本或安装方法。
答案 1 :(得分:0)
链接有问题...似乎是错误的podfile配置。确保将目标Pod正确添加到所需的App目标。