1.更換mac自帶的源
$ gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
$ gem sources -l
https://gems.ruby-china.org
# 確保只有 gems.ruby-china.org
2.sudo gem install? cocoapods
3.有問題
sudo gem install -n /usr/local/bin cocoapods
4.pod setup
5.cd目錄下
touch Podfile
6.open with xcode
7.edit it:
platform :ios, '8.0'
target 'ProjectName' do
pod 'FMDB', '~>2.6'
end
8.pod install
9.pod update
10.Thanks