Member-only story

Install Cocoa Pods for XCode projects

Francisco Igor
3 min readNov 6, 2018

--

In this post I will show how to Install Cocoa Pods for Xcode projects. Cocoa Pods is a dependency manager for Swift and Objective-C Cocoa projects.

Installation

When you install XCode, you also get the gem (RubyGems, the Ruby package manager). This command allows you to install Cocoa Pods for Xcode, without any extra configuration. Execute the following command

sudo gem install cocoapods

After fetching a list of dependency packages, you can use cocoa pods calling the command pod. However, each command must be executed in the root folder of your Xcode project:

  • pod init: To create an empty initial PodFile in your Xcode project folder.
  • pod install: To install packages defined in the PodFile

Using Cocoa Pods command line

Create your Xcode application as usual. Then, after you install Cocoa Pods, you can create the initial PodFile executing pod init inside the root folder of your application. After that, you will get aPodFile like this:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'


target 'my-app-name' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks

--

--

Francisco Igor
Francisco Igor

Written by Francisco Igor

Programming from the past century. Worked with many programming languages and software development tools for desktop, web and mobile. https://fraigo.github.io/

No responses yet

Write a response