创建自己的 pod 时没有这样的模块 'Firebase'

no such module 'Firebase' when creating own pod

我正在尝试创建一个名为 Experiments 的新框架。它正在为我可能使用它构建的任何应用程序包装 Firebase RemoteConfig API。

当我运行以下命令pod lib lint Experiments.podspec时,我得到以下错误输出。

- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
- NOTE...
- NOTE...
.
.
- ERROR | [iOS] xcodebuild:  <path/to/file>: error: no such module 'Firebase'

这是我的 Podfile

platform :ios, '13.0'

target 'Experiments' do

  pod 'Firebase'
  pod 'Firebase/RemoteConfig'

  target 'ExperimentsTests' do
    # Pods for testing
  end

end

这是我的 podspec 文件的相关部分

Pod::Spec.new do |s|
  s.name             = 'Experiments'
  s.version          = '0.1.3'
  s.summary          = 'This pod allows A/B Testing.'
  s.description      = <<-DESC
  This pod facilitates AB Testing. Currently, it is powered by Firebase only.
                       DESC
  s.license          = { :type => 'MIT', :file => 'LICENSE.txt' }
  s.ios.deployment_target = '13.0'
  s.source_files = "Experiments/*.{swift}"
  s.swift_version = "5.0"
  s.frameworks = 'UIKit', 'Foundation'
  s.dependency 'Firebase'
  s.dependency 'Firebase/RemoteConfig'
end

pod install 之后,我能够在 XCode 上成功构建我的框架。

我尝试在 .podspec 文件中使用 s.static_framework = true,但我一直收到错误消息。

如果需要说明,请post发表评论。

s.static_framework = true 为必填项。

可能没有理由依赖 Firebase pod。

s.dependency 'FirebaseRemoteConfig' 没有斜线的可能性更大。

如果这些更改仍然存在错误,请将它们包含在问题中。