What is CocoaPods?
- CocoaPods is a tools used to management the Third party code in IOS project
How to install it?
- use the ruby gem to install
sudo gem install cocoapods
- and the ruby should be above ruby 2.0
- this step is download the info in the ~/.cocoapods
- and you can use
du -sh * to see how it process
- if the gem is too old
sudo gem update --system
- most inportantly
- and when you need to use the pod
- change back to the origin source
how to use it?
- we will need a file called
platform :ios, '7.0'
- then press `ctrl + O` and rename into `Podfile`
- press `ctrl + x` to exit
$ pod install
CocoaPods 0.28.0 is available.
Installing HexColors (2.2.1)
Installing LBBlurredImage (0.1.0)
Installing Mantle (1.3.1)
Installing ReactiveCocoa (2.1.7)
Installing TSMessages (0.9.4)
Generating Pods project
Integrating client project
[!] From now on use `SimpleWeather.xcworkspace`.
- and the Cocoapods will create a xxxxx.xcworkspce
- after you use
- a file called
Podfile.lock will be generated and this file should not be add into the .gitignore.
- for this file will lock on all the version of the dependences
- and you will not be able to change the version of these dependences even you use
- and only the command
pod update will work.
generate the doc
brew install appledoc to generate the Third party library doc
search the library you want in the cocapods library
pod search library_name