ios - 尝试使用 pod 相对于 nanopb 安装 Firebase 时出错

标签 ios swift firebase cocoapods firebase-cloud-messaging

我正在尝试使用 Cocoapod 在我的 swift 应用程序中安装 Firebase,如下所示:

pod 'Firebase/Core'
pod 'Firebase/Messaging'

但是当我处理 pod 安装时出现错误:

[!] Error installing nanopb
[!] /usr/bin/curl -f -L -o /var/folders/82/qk0yjdtx5xl0hnzsk2s2h30h0000gn/T/d20170722-19429-tm6t4q/file.tgz http://koti.kapsi.fi/~jpa/nanopb/download/nanopb-0.3.8.tar.gz --create-dirs --netrc-optional

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   330  100   330    0     0   1941      0 --:--:-- --:--:-- --:--:--  1952
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 503 Service Unavailable

只是服务器宕机了?或者我错过了什么 如果没有 nanopb,还有其他方法吗?

最佳答案

根据 https://github.com/CocoaPods/Specs/blob/master/Specs/8/b/d/FirebaseCore/4.0.4/FirebaseCore.podspec.json , nanopb 添加到 FirebaseCore 4.0.4 的依赖中。

但是 nanopb 服务器现在不工作了。( http://jpa.kapsi.fi/nanopb/download/nanopb-0.3.8.tar.gz )。

因此您应该将 Firebase/Core 版本指定为 4.0.3。

pod 'Firebase/Core', '4.0.3'

关于ios - 尝试使用 pod 相对于 nanopb 安装 Firebase 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45253266/

相关文章:

iOS Swift Core Data 生成带有项目命名空间的 NSManagedObject

java - Android Firebase,从firebase数据库检索数据

javascript - 可以在 Javascript 中同步检查 Firebase 3 身份验证状态吗?

angularfire2 事务和批量写入 firestore

ios - 带有有序键的 NSDictionary

objective-c - Force unwrapped 在预期的参数类型中意味着什么?

ios - 如何在 Swift 中将数据从外部数据库填充到 UItableView

swift - 从 Xcode 调用 C 库函数

ios - UILabel 文本未按预期显示

ios - Swift func with generic where constraint is a protocol which self conforms