使用 CocoaPods 在多个目标中引用 Firebase 时构建运行但归档失败

Build runs but archive fails when referencing Firebase in multiple targets with CocoaPods

我想在 Siri Intent 中使用 Firebase。我尝试 运行 它并且它有效,但是当我尝试存档该应用程序时它无法存档。

我在 macOS Catalina 10.15.3 和 CocoaPods 1.8.4 上使用 Xcode 11.2.1。

错误是:

播客文件:

project 'Sendy.xcodeproj'

# Uncomment the next line to define a global platform for your project
platform :ios, '13.0'

abstract_target 'SendyPods' do

  use_frameworks!

  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'Firebase/Storage'
  pod 'Firebase/Firestore'
  pod 'FirebaseFirestoreSwift'

  target 'Sendy' do
    pod 'Firebase/Crashlytics'
    pod 'Firebase/Analytics'
    pod 'Firebase/Performance'
    pod 'FirebaseMessaging'
    pod 'GoogleSignIn'
  end

  target 'SendyIntents'

  target 'SendyIntentsUI'

end

我最终将构建系统更改为 Xcode 10 之前使用的旧版构建系统。 您可以在文件 -> 工作区设置 -> 构建系统中切换到旧版构建系统。