POD Install

[ 1 ] Open terminal and type:

sudo gem install cocoapods


[ 2 ] After installation, there will be a lot of messages, read them and if no error found, it means cocoapods installation is done. Next, you need to setup the cocoapods master repo. Type in terminal:

pod setup

And wait it will download the master repo. The size is very big (300MB++ at Sept 2016). So it can be a while. You can track of the download by opening Activity and goto Network tab and search for git-remote-https. Alternatively you can try adding verbose to the command like so:

pod setup –verbose

[ 3 ] Once done it will output “Setup Complete”, and you can create your XCode project and save it.

[ 4 ] Then in terminal cd to “your XCode project root directory” (where your .xcodeproj file resides) and type:

pod init

Create podfile in your Xcode project

touch podfile

[ 5 ] Then open your project’s podfile by typing in terminal:

open -a Xcode Podfile(open podfile)

[ 6 ] Your Podfile will get open in text mode. Initially there will be some default commands in there.

Here is where you add your project’s dependencies. For example, in the podfile, type

pod ‘AFNetworking’, ‘0.9.1’

(this line is an example of adding the AFNetworking library to your project).

When you are done editing the podfile, save it and close XCode.

[ 7 ] Then install pods into your project by typing in terminal:

pod install

Depending how many libraries you added to your podfile for your project, the time to complete this varies.




Resources of this article:


(Visited 29 times, 1 visits today)

3 thoughts on "Install cocoa pods"

  1. ElishaX says:

    I see your blog needs some fresh articles.
    Writing manually takes a lot of time, but there is tool for this boring task, search for; Wrastain’s tools for content

  2. Me like, will read more. Thanks!

  3. Cheers, here from yahoo, me enjoyng this, i will come back again.

Leave a Reply

Your email address will not be published. Required fields are marked *