Tag Archives: Cocoapods

Cocoapods

What they promise?

The best way to manage library dependencies in Objective-C projects.

How do you use it (blabla)?

Specify the libraries for your project in an easy to edit text file. Then use CocoaPods to resolve all dependencies, fetch the source, and set up your Xcode workspace.

How do you use it (now for real…)?

Installation

CocoaPods is distributed as a ruby gem, installing it is as easy as running the following commands in the terminal:

$ [sudo] gem install cocoapods
$ pod setup

Get started

Search for pods by name and description.

Then list the dependencies in a text file named Podfile in your Xcode project directory:

$ edit Podfile
platform :ios
pod 'JSONKit',       '~> 1.4'
pod 'Reachability',  '~> 3.0.0'

Now you can install the dependencies in your project:

$ pod install

Make sure to always open the Xcode workspace instead of the project file when building your project:

$ open App.xcworkspace

Note: Everything was taken from here.  You can also check their repo on GitHub here.

Finally…

If you want to use my own library to create NSURLConnections using blocks, you can use it by adding to your  PodFile this:

pod 'NSURLConnection-Blocks', '~> 1.0'
Tagged , , , , ,