CocoaPods is a third-party dependancy manager for Xcode. It is a free utility that was created using Ruby. You install it via Terminal and configure individual Pods using a text editor. 'Pods' refer to third-party libraries that you might want to install. After the first installation of a Pod, CocoaPods will convert your Xcode project into a workspace, which should be used for all subsequent development.
Let's frame our discussion with the terms you will encounter when using CocoaPods:
Installation of CocoaPods involves opening Terminal and entering a single command.
sudo gem install cocoapods
Let's say you want to install Fabric by Twitter.
Go to http://cocoapods.org.
Type "Fabric" in the search bar:
Copy the pod string by selecting the clipboard icon (as seen above).
Go to your project directory in a Terminal window and type:
Open your favorite text editing utility (as seen below):
Enter the Fabric pod string:
pod 'Fabric', '~> 1.1'
Close your text editor and type:
That's it! CocoaPods will handle downloading all necessary pods, install them and configure your project to handle this and any required frameworks.
Occasionally, pods will be updated with new versions. To update to the latest, you simple need to run the installation script again.
To remove a Pod, edit your Podfile with the text editor of your choice. Delete the line that represents the pod you'd like to uninstall. When complete, type
Notice a pattern? :) The 'pod install' command is a one-stop shop for installing and updating your pods.
 CocoaPods http://cocoapods.org
 RubyGems http://en.wikipedia.org/wiki/RubyGems