Quick little blog post here on how to install a Cocoapod into an Xcode project. This is sort of for my own personal reference because I haven’t memorized how to do this yet, but if you need a more in depth tutorial check out How to Install a CocoaPod by Sean Allen.
First, enter a few terminal commands:
$ cd Desktop/SwiftPlayground/MySuperSweetXcodeProject $ pod init $ open -a Xcode Podfile
Next, edit (and save) your Podfile:
# Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'MySuperSweetXcodeProject' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # *** ADD YOUR POD ON THE LINE BELOW *** pod 'MySuperSweetCocoaPod' end
Last, run one final terminal command:
$ pod install