ios - “pod install”卡在 'Receiving Objects'

标签 ios xcode cocoapods

我正在使用 Xcode 8.3.3。

我正在尝试为 IOS 推送通知安装 firebase pod,但无法通过“pod install”命令。 “接收对象”卡在 - 看起来像是 - 随机百分比。

这是终端输出的样子:

Mac-Admin:MKR Medwe$ pod install --verbose
Preparing

Setting up CocoaPods master repo

Cloning spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`)
$ /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress
Cloning into 'master'...
remote: Counting objects: 1447009, done.        
remote: Compressing objects: 100% (315/315), done.        
Receiving objects:  12% (183211/1447009), 36.09 MiB | 2.11 MiB/s  

我试过取消并重新启动,但这也无济于事。

等待大约 30 分钟后,我收到此错误:

[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.
(/usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress

Cloning into 'master'...
remote: Counting objects: 1447009, done.        
remote: Compressing objects: 100% (315/315), done.        
error: RPC failed; curl 56 SSLRead() return error -9806.11 MiB/s    
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
)
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

如错误所示,我已尝试手动添加有问题的“主”源。但是我遇到了和以前一样的问题。大约 20-30 分钟后也会出现相同的错误。

[编辑] 这是我的 Podfile:

platform :ios, '10.3'

target 'MKR' do
  use_frameworks!
  pod 'Firebase/Core'
  pod 'Firebase/Messaging'

  target 'MKRTests' do
    inherit! :search_paths
  end

  target 'MKRUITests' do
    inherit! :search_paths
  end

end

最佳答案

遗憾的是,我无法让 cocoa pod 方法发挥作用。但是手动安装框架对我来说很管用。

由于 Firebase 页面上的解释有点草率,我依赖这篇博文:http://www.mokacoding.com/blog/setting-up-firebase-without-cocoapods/

该帖子提供了非常详尽的解释!它没有解决 git/cocoa pods 问题,但确实解决了最初的问题。

关于ios - “pod install”卡在 'Receiving Objects',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45526503/

相关文章:

swift - Xcode12.4 无法为 pod 目标合并 user_target_xcconfig

ios - pod lint 编译我的 swift 代码而不考虑 #define

ios - 32 位和 64 位的 %d 格式

ios - 找不到“$(SRCROOT) agvtool | increment_build_number | FaSTLane

ios - 如何从 iOS 上的加速度计获得准确的速度?

ios - Xcode 链接器错误 : File not found

ios - 如何将 UITableView 单元格设置为看起来像消息气泡?

xcode - Cocoapods 依赖和 "Library not loaded ... image not found"

ios - 如何将 Date(1440156888750-0700) 这样的日期转换为 Swift 可以处理的东西?

ios - 在 iOS 教程中, "Property toDoItems not found on object type of XYZToDoListViewController"