CocoaPods问题:
1.错误代码:
Setting up CocoaPods master repo
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
解决办法:
- 进入/users/用户名/.cocoapods/repos,删除master文件夹
- 重新下载CocoaPods仓库
git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master
2.错误代码:
cocoapods was not able to update the 'master' repo.if it is a unexpected issue and persists you can inspect it running 'pod repo update --verbose'
解决办法:
- 根据提示,跑一下 pod repo update –verbose
- 如果还是出现原来问题,升级 gem update cocoapods(如果CocoaPods还不是最新版本)
- 如果升级还是出现原来的问题,那么重装CocoaPods
- 在终端输入gem uninstall cocoapods
- 在终端输入gem install cocoapods
- 清除缓存再pod setup
- 清除命令sudo rm -fr ~/.cocoapods/repos/master
- 再pod setup
3.pod setup缓慢解决办法
- 进入/users/用户名/.cocoapods/repos,删除master文件夹
- 重新下载CocoaPods仓库
git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master