about cocoapods Install Use P.S.

  1. sudo gem update --system need Over the wall
  2. gem -v 2.6.7 or later
  3. gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
  4. gem sources -l make sure only gems.ruby-china.org

Install

  1. sudo gem install -n /usr/local/bin cocoapods
  2. pod setup DO NOT break your network, then wait…

Use

  1. Create your project
  2. cd 'your project home'
  3. touch Podfile
  4. vim Podfile
  5. pod install then wait…
  6. open yourProject.xcworkspace

P.S.

  1. Edit Podfile content

    1
    2
    3
    4
    5
    6
    7
    platform :ios, '8.0'
    target 'yourProjectTarget'
    pod 'JSONKit'
    pod 'Reachability', '~> 3.0.0'
    end
  2. Get info about cocoaPods index

    1
    2
    cd ~/.cocoapods
    du -sh *

    maybe over 1.0G

  3. When you modify your Podfile, you need pod update

  4. Reference
    1. 用CocoaPods做iOS程序的依赖管理
    2. Ruby China
    3. Can not perform pod install under el capitan (15A279b)