CocoaPods project setup
Create a Podfile at the root of your project
platform :ios, '5.0'
pod 'AFNetworking'
pod 'OHAttributedLabel'
target :MyAppTests, :exclusive => true do
pod 'Kiwi'
endThen install your project's dependencies
pod installConfigure git to work with Cocoapods:
echo "\n# CocoaPods\nPods" >> .gitignore
git add -f .gitignore Podfile Podfile.lock **/*contents.xcworkspacedataLuke Redpath points out that checking in your Pods directory has its advantages. Consider not adding it to your .gitignore and simply committing your new Podfile, Podfile.lock, and Xcode workspace.
You might consider configuring your project to use Bundler for managing it's dependency on CocoaPods itself. Yes, this is a package manager for your package manager, but it adds an additional explicit declaration of project dependencies and it helps automatically setup boxes with Bundler installed.
bundle install --path vendor/bundle
bundle exec pod install
I'm usually adding the :deployment_target on the top as well, like
platform :ios, :deployment_target => "5.0"