[英]Undefined symbols Xcode error when using Firebase with Google Toolbox for Mac
I have an iOS project which uses Firebase and Google Toolbox for Mac, which are added via Pods. 我有一个iOS项目,该项目使用Firebase和Mac上的Google Toolbox(通过Pods添加)。 My Podfile is as follows:
我的Podfile如下:
target 'MyApp' do
pod 'GoogleToolboxForMac', '~> 2.1'
pod 'GTMSessionFetcher', '~> 1.1'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Messaging'
end
When I build the project in Xcode I get this error: 当我在Xcode中构建项目时,出现此错误:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GTMLogger", referenced from:
objc-class-ref in FirebaseMessaging(GIPReachability_ae5504e4a6a28a1d8997c6f38e8bff8b.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone advise? 有人可以建议吗? Judging from other similar questions I may need import a framework in
Linked Frameworks and Libraries
. 从其他类似的问题来看,我可能需要在“
Linked Frameworks and Libraries
导入一个框架。 I've added UserNotifications.framework
for Firebase Messaging, but not sure what else I'd need...? 我为Firebase Messaging添加了
UserNotifications.framework
,但不确定我还需要什么...?
Looks like you need to add another Cocoapod to your Podfile
: 看起来您需要向您的
Podfile
添加另一个 Podfile
:
target 'MyApp' do
pod 'GoogleToolboxForMac', '~> 2.1'
pod 'GTMSessionFetcher', '~> 1.1' # version 1.1 & newer up to - but not including - 2.0
pod 'gtm-logger', '>= 0.0.5' # version 0.0.5 or newer
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Messaging'
end
and then run pod update
然后运行
pod update
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.