美文网首页
CocoaPods安装方法

CocoaPods安装方法

作者: BeSt2wazi | 来源:发表于2023-03-05 10:24 被阅读0次

1.安装rvm

curl -L get.rvm.io | bash -s stable 

source ~/.bashrc

source ~/.bash_profile

2.安装Homebrew(速度很快,国内镜像源)

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

3.安装ruby

rvm install 3.0.0

4.更换源

sudo gem update --system
gem sources -l // 查看源
gem sources --add https://gems.ruby-china.com/  
gem sources --remove https://rubygems.org/    //删除

5.安装CocoaPods

sudo gem install -n /usr/local/bin cocoapods

6.安装本地库(国内镜像速度快)

git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git  ~/.cocoapods/repos/trunk

7.pod 检查

pod search AFNetworking

参考文章
https://www.jianshu.com/p/08e5f06dd31d
https://zhuanlan.zhihu.com/p/372576355

相关文章

网友评论

      本文标题:CocoaPods安装方法

      本文链接:https://www.haomeiwen.com/subject/nqpuldtx.html