How to install Podfile in XCode Project?


Dear Folks, I hope you are doing well. Sometimes a developer is required a third-party library to use inside the XCode project, such as Alamofire, SDWebView etc. This he uses the dependency manager (Cocoapod or Carthage) to inject the library in the project. Here I going to explain about Cocoapod. CocoaPods allows developers to easily integrate 3rd party libraries/frameworks into their projects without the need to manually download each library into your project and constantly check for updates individually.

Before proceeding further, you must install Cocoapod in your Mac System. You can use below commands in terminal to check whether your system has CocoaPod or not.

If your system has pod installed, you will see the Cocoapod version like below.

If you have not installed yet, you can follow below steps for installing:

Open terminal and type:

Just wait for successful installation. After installation, you can check for pod version through above command in terminal. If it is showing the version, you are ready to move further steps.

Let’s get started.

Assuming you have a working Xcode project and you have CocoaPods installed via terminal. Generally, a developer delivers a zip file of the XCode project. Extract the project anywhere in your system. Open your terminal and type command cd to change directory path to the project path, give a single space after cd command. After this drag the project path to the terminal window like below, then press enter. You can now see the complete path of the project in the terminal.

Type the below command to remove Podfile.lock file from the project directory. Without removing this file cocoapod will not allow you to install the pod libraries.

Now finally install the pod libraries using below command. The installation process will be started.

After a successful installation, the message “Pod installation complete!” will appear in the terminal.

From now on, open and work with .xcworkspace instead of .xcodeproj. In above example, you can see the DummyProject.xcworkspace file to launch the project.

For more information regarding CocoaPod refer following links:

If you have any doubts regarding this article, just leave a comment below. Thanks for reading.

. . .

Leave a Comment

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

Be the first to comment.


The results provided were above our expectations both in deliverability timeline as well as operation. They are a top-notch company with many resources and a company we feel honoured to work with again!

Lee Seward

Lee Seward

Founder, Gro-Connect

Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home