1.安装cocoapods
sudo gem install cocoapods --user-install
提示:
WARNING: You don't have /Users/mmy/.local/share/gem/ruby/2.6.0/bin in your PATH,
gem executables will not run.
2.打开文件
open ~/.zshrc
3.配环境
export PATH=/Users/mmy/.local/share/gem/ruby/2.6.0/bin:$PATH
3.重置
source ~/.zshrc
4.验证pod
pod --version
5.官方文档
https://guides.cocoapods.org/using/getting-started.html#installation
6.给git设置代理
open ~/.gitconfig
编辑文件文章来源:https://www.toymoban.com/news/detail-664541.html
[http]
proxy = socks5://127.0.0.1:7890
proxy = http://127.0.0.1:7890
[https]
proxy = socks5://127.0.0.1:7890
proxy = https://127.0.0.1:7890
7.打开项目的ios文件夹的终端文章来源地址https://www.toymoban.com/news/detail-664541.html
pod install
到了这里,关于【Mac】安装cocoapods的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!