安裝
- Gem切換國內(nèi)Taobao鏡像倉庫
gem sources --remove https://rubygems.org/
gem sources -a https://gems.ruby-china.com/
- 為了驗(yàn)證你的Ruby鏡像是并且僅是taobao教沾,可以用以下命令查看:
gem sources -l
只有在終端中出現(xiàn)下面文字才表明你上面的命令是成功的:
- 安裝Cocoapods
sudo gem install -n /usr/local/bin cocoapods
兼容性問題
- CocoaPods compatibility with Apple DTK (Apple Silicon) .
解決方法:
- Locate Terminal.app in Finder. (Applications->Terminal.app)
- Right-click and choose Get Info
- Check the “Open using Rosetta“
-
Quit all instances of Terminal app and run it again
Using Rosetta