How To Install Cocoapods

Appliations > Utilities > Terminal

sudo gem install cocoapods
pod setup

If it fails due to "Failed to build GEM native extension" ensure the xcode Command Line Tools are installed: In xcode close any open project, then Preferences > Downloads > Components and click the download down arrow icon next to 'Command Line Tools'.