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!
- Next, click create a new Xcode project and select App.Click next.
![
- 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'
- 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!