无法找到 `Firebase 的规范

Unable to find a specification for `Firebase

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

我收到这个错误:

pod Unable to find a specification for 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 教程的每一步。

尝试删除特定版本信息,只需:

pod 'Firebase'

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

pod update Firebase

如果您确定 运行

pod setup
pod install

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

打开它