【发布时间】:2019-12-26 05:58:41
【问题描述】:
在我们的项目中使用 carthage (firebase/firebase-ios-sdk) 安装了许多 Firebase 组件,这些组件成功运行。
我们尝试在已安装的 Firebase 组件之外添加 FirebaseAuth。
Carthage 更新命令完成且没有错误。我们做了通常的迦太基库安装步骤。我们在构建阶段向输入文件和输出文件添加了行,然后将 FirebaseAuth.framework 添加到链接框架和库。
当我们尝试构建项目时,它构建失败。
我们试过了
- 清理构建文件夹
- 删除派生数据
还有其他几个小尝试。
我们已经检查过了
程序(firebase/firebase-ios-sdk) - 在项目目标上添加了 GoogleService-Info.plist - 在“构建设置”中的“其他链接器标志”中添加了 $(OTHER_LDFLAGS) -ObjC 标志。 - 从 Link Binary With Libraries Build Phase 中删除 Firebase.framework。
购物车文件
只有 firebase 部分,我们还安装了其他几个库。
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 6.4.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFirestoreBinary.json" == 6.4.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json" == 6.4.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json" == 6.4.0
错误日志
ld: warning: Could not find auto-linked framework 'Firebase'
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GTMSessionFetcherService", referenced from:
objc-class-ref in FirebaseAuth(FIRAuthBackend.o)
"_GTMFetcherStandardUserAgentString", referenced from:
+[FIRAuthBackend authUserAgent] in FirebaseAuth(FIRAuthBackend.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing Recent Messages
:-1: Could not find auto-linked framework 'Firebase'
:-1: Undefined symbol: _OBJC_CLASS_$_GTMSessionFetcherService
:-1: Undefined symbol: _GTMFetcherStandardUserAgentString
我们需要安装 FirebaseAuth。
我什至不确定这是否是由于尝试使用 Carthage 安装 FirebaseAuth 导致的问题。如果不可能,我们可能会使用 Cocoapods,但我们更喜欢使用 Carthage 安装 FirebaseAuth。
【问题讨论】:
标签: ios firebase firebase-authentication carthage