修复CocoaPods更新错误

来源:互联网 发布:淘宝买衣服不撞衫 编辑:程序博客网 时间:2024/05/17 02:26

在Xcode中使用cocoapods-xcode-plugin插件更新第三方框架时框架并没有更新, 并且出现下面警告:

[!] Unable to satisfy the following requirements:- `MJRefresh`, `~> 2.4.7` required by `Podfile`

参照网友提供的方法, 使用以下命令更新CocoaPods版本库同样没有效果

pod update --verbose

后来发现这是个已知的BUG, CocoaPods的版本库是有缓存的, 但在使用pod指令更新版本库时会出现冲突, 导致更新并不能如期完成, 需要手动删除本地缓存, 再进行更新.

具体方法:

$ sudo rm -fr ~/.cocoapods/repos/master$ pod setup

参考:

  1. Repairing Our Broken Specs Repository @Kyle Fuller
  2. Cocoapods error during pod update @Stack Overflow
0 0
原创粉丝点击