Codementor Events

Setting up CocoaPods!

Published Jul 13, 2021Last updated Nov 15, 2021
Setting up CocoaPods!

In this post, I will discuss how to install CocoaPods in Xcode using MacOs Terminal!

  • Let's start by opening an Xcode project!

Image 7-13-21 at 3.46 PM.jpg

  • Next, click create a new Xcode project and select App.Click next.

![Image 7-13-21 at 3.51 PM.jpg

  • Now name the app Sample App. Hit next then create.

Installing Pods using MacOS Terminal.

  • Open Terminal.
  • If your Terminal is not set to use bash, copy this command

chsh -s /bin/bash

  • In the terminal, type sudo gem install cocoapods
  • Next, navigate to the folder where your project is stored. If you don’t know how, copy the following command line prompt into terminal according to your project file path

cd Documents/'Sample App'

Screen Shot 2021-07-13 at 4.05.57 PM_censored.jpg

  • To ensurse you're in the right folder you can use the pwd command.
  • Use the pod init command to create the Podfile.
  • Once that is finished, a podfile will be created.
  • Navigate to the project folder and open the Podfile.

Here, you'll be able to add the pod files you wish to use in your library!

FOLLOW MY INSTAGRAM
FOLLOW MY GITHUB
FOLLOW MY MUSIC

Discover and read more posts from Kody Young
get started