我手动导入firebase
运行时出现以下错误:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GPBDescriptor", referenced from:
objc-class-ref in FirebaseMessaging(GtalkCore.pbobjc.o)
objc-class-ref in FirebaseMessaging(GtalkExtensions.pbobjc.o)
"_OBJC_CLASS_$_GPBCodedOutputStream", referenced from:
objc-class-ref in FirebaseMessaging(FIRMessagingSecureSocket.o)
"_OBJC_CLASS_$_GPBFileDescriptor", referenced from:
objc-class-ref in FirebaseMessaging(GtalkCore.pbobjc.o)
objc-class-ref in FirebaseMessaging(GtalkExtensions.pbobjc.o)
"_OBJC_CLASS_$_FIRInstanceID", referenced from:
objc-class-ref in FirebaseMessaging(FIRMessaging.o)
"_OBJC_METACLASS_$_GPBMessage", referenced from:
_OBJC_METACLASS_$_GtalkHeartbeatPing in FirebaseMessaging(GtalkCore.pbobjc.o)
...
clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
另外,我添加了
libz,libsqlite3,libc++
和libcucore
在
AppDelegate
中,我添加了FirebaseApp.configure()
最佳答案
主要是如果您要使用FirebaseMessaging.framework
,则需要将其与不同框架组合在一起。 如果没有它们,您将有链接器错误。
没有其他的。不需要所有这些libz
,libsqlite3
,libc++
和libcucore