Start by typing below command in terminal

In most cases just the second command would however sometimes you may get below error in case you have an older version of activesupport installed

Error installing cocoapods: activesupport requires Ruby version >= 2.2.2

The first command will make sure you don’t get the above error

Once the above commands run successfully type below command to set up Cocoapods master repo

This will download the master repo. The size of the repo is quite big around 380MB so it can take a while depending upon your internet download speed.

Once the above is completed, navigate within terminal to your Xcode project and run below command to create the podfile

Open the newly created podfile with text editor, and add the required libraries e.g.

pod ‘Google/Analytics’

Then run below command to install the required libraries


Leave a Reply

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