iOS开发 MacPro 安装CocoaPods
作者:
Kidnight | 来源:发表于
2020-04-17 15:59 被阅读0次CocoaPods安装:涉及的软件的官网地址
CocoaPods安装:相关命令
// 查看本地cocoapods
gem list --local | grep cocoapods
// 查看所有cocoapods
gem list
// 卸载cocoapods
sudo gem uninstall cocoapods
// 卸载指定版本的cocoapods
sudo gem uninstall cocoapods -v (移除的版本号)
// 卸载cocoapods-core
sudo gem uninstall cocoapods-core
// 安装Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
// 安装ruby
brew install ruby
// 查看ruby源
gem sources -l
// 替换ruby源为https://gems.ruby-china.com/
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
// 安装CocoaPods
sudo gem install -n /usr/local/bin cocoapods
// 安装指定版本cocoapods
sudo gem install cocoapods -v (要安装的版本号)
// 初始化CocoaPods的master仓库
pod setup
// pod setup太慢解决方法
cd ~/.cocoapods/repos
pod repo remove master
git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
pod repo update
pod setup
// 如果还是发现太慢,可以尝试一下重启电脑再执行下面的命令
pod repo update
pod setup
// 华丽的分割线======================================
// 以下可选
// 安装rvm(ruby versin manager)
curl -L get.rvm.io | bash -s stable
// 执行.bash_profile文件
source ~/.bash_profile
// 查看ruby列表
rvm list known
// 安装2.2.3版本ruby
rvm install 2.2.3
本文标题:iOS开发 MacPro 安装CocoaPods
本文链接:https://www.haomeiwen.com/subject/pafyvhtx.html
网友评论