iOS安装CocoaPods步骤:
CocoaPods官网:https://cocoapods.org/
$ sudo gem install cocoapods 一键安装
cocoaPods依赖Ruby,Gem, 检查下这两个是否安装好
$ ruby -v
$ gem -v
都显示版本说明安装成功
使用前需要初始化pod $ pod setup
此步骤遇到stucking情况,进度一直卡在下载mater不动
解决方法:
git clone github.com/CocoaPods/S… ~/.cocoapods/repos/master
pod setup
主要是下载cocoapods的库出现问题,可以手动下载也可以命令直接下载拷贝,之后再pod setup即可
uninstall cocoapods
First, determine which version(s) of Cocoapods you have installed by running this in Terminal:
gem list --local | grep cocoapods
You see output similar to this:
cocoapods (0.27.1, 0.20.2) cocoapods-core (0.27.1, 0.20.2) cocoapods-downloader (0.2.0, 0.1.2)
Here, I have two versions of Cocoapods installed.
To completely remove, issue the following commands:
gem uninstall cocoapods gem uninstall cocoapods-core gem uninstall cocoapods-downloader
If you have multiple versions installed, like I have, it will prompt you to choice a specific version or all. If you want to uninstall a specific version you can also use the -v switch as follows:
gem uninstall cocoapods -v 0.20.2
Running gem list --local | grep cocoapods again will confirm that Cocoapods has been removed.