mac安装cocoapods

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

你可能感兴趣的:(mac安装cocoapods)