Firebase Podfile - CocoaPods 无法更新
Firebase Podfile - CocoaPods was not able to update
我正在尝试使用 Cocoapods 将 Firebase 更新到 3.0.2
第一步我注释掉了 pod 'Firebase'
然后我把它加回去 运行 pod install
然后它安装了 Firebase 2.5.1,所以我 运行 pod update 以获得 Firebase 3.0.2,因为堆栈溢出的其他问题暗示。
但我总是得到这个结果:
所以我的问题是我必须做什么才能获得更新?
在我的 Podfile 中,我还取消了 use_frameworks 的注释!但这并没有改变任何东西。
我将 Podfile 更改为:
但仍然收到错误消息
根据 Firebase 文档,从版本 3.x 开始,Firebase pod 对每个 API.
都有单独的子规范
要使用 CocoaPods 包含 Firebase,您应该将以下内容写入您的 Podfile:
pod 'Firebase/Core'
pod 'Firebase/Database'
编辑:
我没看到你没有在你的 Podfile 中实现 source 'https://github.com/CocoaPods/Specs.git'
,通过在你的 Podfile 顶部添加该行它应该可以工作。
我测试了这个 Podfile,它运行良好:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target 'MyTarget' do
pod 'Firebase/Core'
pod 'Firebase/Database'
end
如果这对您不起作用,请更新到最新的 CocoaPods 并重试。
使用 pod 搜索 firebase
你可以看到:
-> 火力地堡 (2.5.1)
Firebase 的官方 iOS 客户端库。
pod 'Firebase', '~> 2.5.1'
- 主页:https://www.firebase.com/
- 来源:https://cdn.firebase.com/ObjC/Firebase.framework-2.5.1.zip
- 版本:2.5.1、2.5.0、2.4.3、2.4.2、2.4.1.1、2.4.1、2.4.0、2.3.3、2.3.2、
2.3.1, 2.3.0, 2.2.2, 2.2.1, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.3, 2.0.2, 2.0.1,
2.0.0, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.12, 1.1.11, 1.1.10, 1.1.9, 1.1.7,
1.1.6、1.1.5、1.1.4、1.1.3、1.1.2、1.1.1、1.1.0、1.0.9、1.0.7、1.0.5、1.0.0
[主回购]
所以使用:
pod 'Firebase', '~> 2.5.1'
我删除了 podfile.lock.
然后安装 pod。
这对我有用
我正在尝试使用 Cocoapods 将 Firebase 更新到 3.0.2
第一步我注释掉了 pod 'Firebase'
然后我把它加回去 运行 pod install
然后它安装了 Firebase 2.5.1,所以我 运行 pod update 以获得 Firebase 3.0.2,因为堆栈溢出的其他问题暗示。 但我总是得到这个结果:
所以我的问题是我必须做什么才能获得更新? 在我的 Podfile 中,我还取消了 use_frameworks 的注释!但这并没有改变任何东西。
我将 Podfile 更改为:
但仍然收到错误消息
根据 Firebase 文档,从版本 3.x 开始,Firebase pod 对每个 API.
都有单独的子规范要使用 CocoaPods 包含 Firebase,您应该将以下内容写入您的 Podfile:
pod 'Firebase/Core'
pod 'Firebase/Database'
编辑:
我没看到你没有在你的 Podfile 中实现 source 'https://github.com/CocoaPods/Specs.git'
,通过在你的 Podfile 顶部添加该行它应该可以工作。
我测试了这个 Podfile,它运行良好:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target 'MyTarget' do
pod 'Firebase/Core'
pod 'Firebase/Database'
end
如果这对您不起作用,请更新到最新的 CocoaPods 并重试。
使用 pod 搜索 firebase
你可以看到:
-> 火力地堡 (2.5.1) Firebase 的官方 iOS 客户端库。 pod 'Firebase', '~> 2.5.1' - 主页:https://www.firebase.com/ - 来源:https://cdn.firebase.com/ObjC/Firebase.framework-2.5.1.zip - 版本:2.5.1、2.5.0、2.4.3、2.4.2、2.4.1.1、2.4.1、2.4.0、2.3.3、2.3.2、 2.3.1, 2.3.0, 2.2.2, 2.2.1, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.12, 1.1.11, 1.1.10, 1.1.9, 1.1.7, 1.1.6、1.1.5、1.1.4、1.1.3、1.1.2、1.1.1、1.1.0、1.0.9、1.0.7、1.0.5、1.0.0 [主回购]
所以使用: pod 'Firebase', '~> 2.5.1'
我删除了 podfile.lock.
然后安装 pod。
这对我有用