【问题标题】:Unable to find a specification for `Firebase找不到“Firebase”的规范
【发布时间】:2016-01-08 15:20:45
【问题描述】:

我在 Xcode 上为 swift 应用程序安装 Firebase 时遇到问题。

我收到了这个错误:

pod 无法找到 Firebase (>= 2.5.0) 的规范

我的 Podfile 是这个:

# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!

pod 'Firebase', '>= 2.5.0'
target 'banana' do

end

target 'bananaTests' do

end

target 'bananaUITests' do

end

我不知道为什么,因为我按照 Firebase 教程的每个步骤进行操作。

【问题讨论】:

  • 我发现基本上重新安装 cocoapods 可以帮助解决这个烦人的问题
  • 你用的是什么版本的 cocoapods?
  • 当我只写 pod 'Firebase' 时,我也遇到了一个错误“无法找到 Firebase 的规范”我得到了 cocoapods 的 2.0.0 版本

标签: xcode firebase cocoapods


【解决方案1】:

尝试删除特定版本信息,简单:

pod 'Firebase'

如果这不起作用,请尝试通过在项目根目录的命令行上键入以下内容来强制您的本地 pod 规范存储库更新 Firebase:

pod update Firebase

【讨论】:

  • 当我只写 pod 'Firebase' 时,我也收到一个错误“无法找到 Firebase 的规范”
  • 我刚刚在我的回答中添加了另一个想法。
【解决方案2】:

如果你确定你跑了

pod setup
pod install

它对我有用。确保您没有使用 Mac 中安装的默认 Texteditor 打开 Podfile,它会弄乱您的单引号。只能用 Xcode 打开它。

【讨论】:

    猜你喜欢
    • 2017-02-27
    • 2017-08-21
    • 2018-07-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-11
    • 2014-03-13
    相关资源
    最近更新 更多