从cocospod下载一个16年的老项目,然后pod install,安装一下第三方依赖。然后提示以下错误。
1 | Re-creating CocoaPods due to major version update. |
我老的podfile文件是这样的
1 | source 'https://github.com/CocoaPods/Specs.git' |
修改后
1 | source 'https://github.com/CocoaPods/Specs.git' |
重新pod install 就能下载了。
因为老的格式没有按下面的这个语法写。新的major版本不支持了。
1 | target "你的项目名" do |
执行 pod setup 很慢很慢的解决方案
前期准备(安装过可以省略):1.查看ruby 2.更新 gem 3.安装cocoapods。
pod repo remove master
pod repo add master https://gitcafe.com/akuandev/Specs.git
会出现 [!] To setup the master specs repo, please run `pod setup`这里不用管它,继续
这一步把https改成git 速度上会快一点
- git clone git://gitclub.cn/CocoaPods/Specs.git ~/.cocoapods/repos/master
- pod repo update
//到这里结束大概20来分钟,你可以试一下 pod search masonry