在 firebase 和 firebasecore 之间启动应用程序时不兼容

Incompatibility when launching app between firebase and firebasecore

从 CocoaPods 迁移到 Carthage 时,我们的 Firebase 实现出现以下错误:

This app could not be installed at this time.
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Could not install at this time.
Recovery Suggestion: Found bundle at XXX/Library/Developer/CoreSimulator/Devices/6858FE7A-714D-4A5E-A89C-AA487F5B21B6/data/Library/Caches/com.apple.mobile.installd.staging/temp.gLzACY/extracted/YYY/Frameworks/FirebaseCore.framework with the same identifier (com.firebase.Firebase) as bundle at XXX/Library/Developer/CoreSimulator/Devices/6858FE7A-714D-4A5E-A89C-AA487F5B21B6/data/Library/Caches/com.apple.mobile.installd.staging/temp.gLzACY/extracted/YYY/Frameworks/Firebase.framework

Found bundle at XXX/Library/Developer/CoreSimulator/Devices/6858FE7A-714D-4A5E-A89C-AA487F5B21B6/data/Library/Caches/com.apple.mobile.installd.staging/temp.gLzACY/extracted/YYY/Frameworks/FirebaseCore.framework with the same identifier (com.firebase.Firebase) as bundle at XXX/Library/Developer/CoreSimulator/Devices/6858FE7A-714D-4A5E-A89C-AA487F5B21B6/data/Library/Caches/com.apple.mobile.installd.staging/temp.gLzACY/extracted/YYY/Frameworks/Firebase.framework
Domain: MIInstallerErrorDomain
Code: 57
User Info: {
FunctionName = "-[MIInstallableBundle performPreflightWithError:]";
LegacyErrorString = DuplicateIdentifier;
SourceFileLine = 391;
}

原始 CocoaPods:

  target 'ZZZ' do
    pod 'Firebase/Database', '~> 6.1'
  end

这次迁移的我的 Cartfile:

binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json" == 6.1.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 6.1.0

通过我的代码,我们正在导入 "Firebase" 和 "FirebaseDatabase"

通过 xcodegen 嵌入这些生成的框架:

  - carthage: FirebaseDatabase
  - carthage: FirebaseAnalytics
  - carthage: leveldb-library
  - carthage: Firebase
  - carthage: GoogleUtilities
  - carthage: FirebaseCore

我已经尝试在我的购物车文件中使用 ~>,但同样的问题发生了。 我试过不嵌入 FirebaseCore,但由于缺少 Firebase 类.

而导致编译失败

您完成了 docs 的步骤了吗?

Delete Firebase.framework from the Link Binary With Libraries Build Phase.