For more information about the functions of pods, see the encyclopedia.
1. Installation (requires a ruby environment ):
sudo gem install CocoaPods
2. Search Class Library:
The name of the pod Search Class database. Fuzzy search (for example, afnetworking) is supported)
3. Usage:
A. Open the terminal and use the CD command to locate the project root path that requires cocoapods:
B. Create a podfile in the project. Run the following command: Touch podfile; 6.0 (the lowest supported IOS version must be specified in some libraries ).
C. Add a database. Take mbprogresshud as an example:
. Run the SEARCH Command: pod search mbprogresshud. The following prompt is displayed:
-> MBProgressHUD (0.9) An iOS activity indicator view. pod ‘MBProgressHUD‘, ‘~> 0.9‘ - Homepage: http://www.bukovinski.com - Source: https://github.com/matej/MBProgressHUD.git - Versions: 0.9, 0.8, 0.7, 0.6, 0.5 [master repo]
. In the created podfile, enter 'mbprogresshud ',' ~> 0.9'
D. Run the initialization command: pod install.
Note: After completing the preceding steps, open the project with cocoapodsdemo. xcworkspace instead of the previous. xcodeproj file. In this way, all the databases you add will appear in the workspace.
Cocoapods installation and use and configuration of private libraries