【问题标题】:no such module 'Firebase' when creating own pod创建自己的 pod 时没有这样的模块“Firebase”
【发布时间】:2020-07-27 16:31:23
【问题描述】:

我正在尝试创建一个名为 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,但我不断收到错误消息。

如果您需要澄清,请发表评论。

【问题讨论】:

    标签: ios swift firebase cocoapods


    【解决方案1】:

    s.static_framework = true 为必填项。

    可能没有理由依赖 Firebase pod。

    s.dependency 'FirebaseRemoteConfig' 没有斜线更有可能工作。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-04
      • 1970-01-01
      • 1970-01-01
      • 2018-06-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多