Skip to content

Setting up for development on CocoaPods

alloy edited this page Sep 21, 2012 · 27 revisions
  1. Create a clone of the CocoaPods source.

     $ git clone git://github.com/CocoaPods/CocoaPods.git
     $ cd CocoaPods
    

    See release process.

  2. Update git submodules and install the dependencies.

    If you are using RVM:

     $ echo "rvm use --create ruby-1.9.3-p194@cocoapods" > .rvmrc
     $ echo ".rvmrc" >> .git/info/exclude
     $ cd .. && cd -   # to reload rvm config. follow rvm instructions
     $ bundle install
     $ rake bootstrap # init/update git submodules and install dependencies using this task
    

    Otherwise:

     $ sudo gem install bundler # if it's not already installed
     $ bundle install
     $ rake bootstrap # init/update git submodules and install dependencies using this task
    
  3. Verify that all specs pass and all examples build. (See rake -T for other tasks.)

     $ rake spec
     $ rake examples:build
    
  4. Start kicker, which will run the specs relevant to the files you update.

     $ kicker -c
    
  5. Create your patch, verify all specs still pass and examples still build, and create a pull request.

Using latest pod version

If you would like to run latest pod command in terminal for you project. You could run it with full path, i.e.

$HOME/code/CocoaPods/bin/pod install

For convenience you could add the next alias to you .zshrc or .bashrc or somewhere else:

 alias pod-dev='$HOME/code/CocoaPods/bin/pod'

Other advanced aliases:

  • If you are using RVM and have specific gemset for cocoapods (i.e. with the same name) than you could use next alias:

      alias pod-dev='rvm ruby-1.9.3-p194@cocoapods do $HOME/code/CocoaPods/bin/pod'
    
  • If you want to autoload Pry and the Awesome Print gems set the COCOA_PODS_ENV environment variable to development. This can be done with an alias like:

      alias pod-dev='COCOA_PODS_ENV=development ~/Documents/GitHub/CocoaPods/bin/pod'
    

    Note: The no-color option is not supported in this environment.

After creating your patch.

For information on when a new release should be made see the Release process page and see the Push access page for info regarding our policy.