Cocoapods Guide
·1 min
Table of Contents
CocoaPods is an application level dependency manager for Objective-C, Swift projects.
Installing CocoaPods #
Update RubyGems
sudo gem update —system
Install CocoaPods
sudo gem install cocoapods
You may get this prompt during the install process: rake’s executable “rake” conflicts with /usr/bin/rake Overwrite the executable? [yN] enter y
Complete Setup pod setup
SETUP PROJECT:
- cd
- pod init
- open -a Xcode Podfile
- pod install
List all pods which have newer versions than the ones listed in the Podfile.lock #
$ pod outdated
Update to newer version #
$ pod update
or
$ pod update <pod-name>
How to fix initial long running setup process #
Manually download the master repo or clone using git.
$ cd ~/.cocoapods/repos
$ git clone --depth 1 https://github.com/CocoaPods/Specs.git master
install pod without updating the master repo #
$ pod install --no-repo-update
Register in cocoapod #
pod trunk register <email>
Submit podspec #
pod trunk push <NAME>.podspec
Lint podspec #
pod spec lint <NAME>.podspec
or
pod spec lint
Lint Library
pod lib lint