CocoaPods, cocoapods
Facilitate management of numerous third-party libraries (automatic configuration of relevant information) and provide dynamic updates (using Terminal Operations)
Install tools first
sudo gem install cocoapods
Then we need to tell cocoapods which project needs to use it.
Finder enters the project directory and then drag any file into a TXT file to quickly obtain the file path
Then we need to create a directory file to tell cocoapods which libraries we want to use
pod init
This command will automatically generate a Podfile File
The file declares that the Global Platform is IOS and the minimum is 6.0.
Then, tell cocoapods which databases we want to use and use cocoapods separately for unit tests based on the information in the Podfile file.
To check whether a third-party Library supports cocoapods, run the following command:
MSSimpleGauge is what we want to use a third-party library. The above information tells us that it supports cocoapods.
Run the following command to view all the help information of cocoapods:
Then we add the name of the third-party library to the directory file.
Of course, I have not specified a third-party version. By default, the latest version is used to save files.
Then we can install cocoapods.
pod install
Enun
Then I stuck in the progress of Analyzing dependencies (analyzed the relevance here). After some inquiries, my network speed was too slow, and then a friend provided a method for Wall bypass installation.
pod install --verbose --no-repo-update
When the following information appears, the installation is successful.
Or
If the installation is normal, you can skip this method.
The printing information of the installation process is displayed as version 0.5 or the latest version.
Now, re-enter the project and use the project file with the extension.
The third party has been successfully added and can be used. [VPN for direct use]
Refer:
CocoaPods installation and usage tutorial
CocoaPods-usage
CocoaPods