新MAC 安裝Pods

1.安裝Xcode Command Line Tools。
xcode-select --install
一路安裝到底即可


截屏2021-07-06 下午3.33.17.png

2.安裝Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"

1必備設置
替換 brew.git:
git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git

2替換 homebrew-core.git:
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

3.安裝rvm
上github下載rvm,https://github.com/rvm/rvm.git
雙擊打開/bin/rvm-installer

.../Users/****計算機名***/.rvm/ is complete.

提示這個說明安裝完成。
然后配置到.bash_profile
export PATH="/Users/****計算機名***/.rvm/bin:$PATH"
終端輸入:rvm -v 查看版本

4.安裝 Ruby

brew install ruby

安裝完成后查看其 Ruby 源:
gem sources -l

如果顯示的ruby源不是ruby-china,則需要進行源替換:
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/

5.ruby源正常, 安裝CocoaPods:
sudo gem install -n /usr/local/bin cocoapods

安裝成功后進行pod設置:
pod setup

執(zhí)行完畢后, 查看pod版本看安裝是否成功:
pod --version

最后編輯于
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內(nèi)容