Pod命令
ruby -v
gem sources -l
gem sources --remove https://rubygems.org/
gem sources --addhttps://gems.ruby-china.com/
系统会提示:https://gems.ruby-china.com/ added to sources
gem sources -l
*** CURRENT SOURCES ***
https://gems.ruby-china.com/
sudo gem install -n /usr/local/bin cocoapods
pod setup
建立podFile文件
vim Podfile
键盘输入 i,进入编辑模式,输入
platform :ios,'8.0'
target "PodTest" do
pod 'MBProgressHUD','~> 1.0.0'
end
然后按Esc,并且输入“ :”号进入vim命令模式,然后在冒号后边输入wq
激动人心的时刻到了:确定终端cd到项目总目录,然后输入 $pod install,等待一会。
参考网页:https://www.jianshu.com/p/11b65d713236