简体   繁体   English

将Firebase与Mac的Google Toolbox结合使用时出现未定义的符号Xcode错误

[英]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.

相关问题 Google Analytics(分析)和Xcode 7出现未定义符号错误 - Undefined symbols error with Google Analytics and Xcode 7 使用Mac的Google工具箱进行单元测试编译时出错 - Error compiling for unit test using google toolbox for mac 带有未定义符号的快速 cocos xcode 用于架构错误 - quick cocos xcode with Undefined symbols for architeture error 架构x86_64的未定义符号:用于Xcode 8.3.2中的Firebase - Undefined symbols for architecture x86_64: for Firebase in Xcode 8.3.2 当标题不缺失时,在xcode中获取错误“架构i386的未定义符号” - Getting error “Undefined symbols for architecture i386” in xcode when headers are not missing 在构建阶段运行脚本中使用 Firebase 上传符号时,Xcode 构建永远不会完成 - Xcode build never finishes when using Firebase upload-symbols in Build Phase Run Script 使用xcode使用C创建静态库,错误:“体系结构i386的未定义符号”! - Using xcode to create static library with C, Error: “Undefined symbols for architecture i386”! 在Xcode中将iAds插件用于Unity时,体系结构armv7的未定义符号 - Undefined symbols for architecture armv7 when using iAds plugins for Unity in xcode 在 Xcode 4.5 中使用 ZXing 库时架构 armv7 的未定义符号 - Undefined symbols for architecture armv7 when using ZXing library in Xcode 4.5 Firebase未定义的符号 - Firebase Undefined symbols
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM