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.配環(huán)境
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設(shè)置代理
open ~/.gitconfig
編輯文件文章來源:http://www.zghlxwxcb.cn/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文件夾的終端文章來源地址http://www.zghlxwxcb.cn/news/detail-664541.html
pod install
到了這里,關(guān)于【Mac】安裝cocoapods的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!