1.安裝brew
打開終端,輸入命令 ? /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

到這一步點擊回車

這里輸入密碼后開始下載brew

brew安裝完成
附brew官網(wǎng):https://brew.sh/index_zh-cn.html
2.安裝CocoaPods
打開終端,輸入命令 ? ?brew install cocoa pods

cocoapods安裝完成
安裝完成之后 ?pod search xxx,等下載完成之后就可以使用啦。