To use cocoapods, you need to:
sudo gem install cocoapods
pod setup --verbose
pod init
open -a Xcode Podfile
(I'm pretty sure you can also just insert a file called "Podfile" (no extension) into the directory...)
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'MyProject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'
# Pods for IceCreamShop
end
You can specify and exact version of the pod, recommended for release builds.
pod 'Swiftlint', '1.15.22'
You can specify a greater than version of the pod, recommended for experimental/development builds.
pod 'Swiftlint', '~>1.15.22'
That syntax will allow cocoapods to search for the version of the pod matching '1.15.x'. You could also use '~>1.15' to match the latest version of '1.x'.
pod install
To update a pod to a newer version, run:
pod update
If a framework is not included in the set that Cocoapods automatically recognizes, e.g. a private repo, you can add the source above the pods in the Podfile:
source 'https://github.com/MyBestFriendsFramework.git'