安装cocoapods 一直卡在Setting up CocoaPods master repo上的解决办法
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
删除项目中与cocoapods有关的东西,包括Podfile
执行命令 pod init
如果出现
[!] Existing Podfile found in directory
执行命令
cd ~/.cocoapods/repos
git clone https://github.com/CocoaPods/Specs.git master
再执行命令
pod init
pod install
然后将需要添加的类库加到Podfile中
pod update
就可以了
如图