CocoaPods installation and use details, cocoapods Installation Details
What is CocoaPods?
Many third-party open-source libraries, such as JSONKit and SDWebImage, are frequently used when you develop iOS applications. A class library may use other class libraries. to use it, you must download other class libraries. Other class libraries also use other class libraries ", this may be a special case. In short, I mean it is very troublesome to manually download the required class libraries one by one. Another common situation is that the class libraries used in your project are updated. You must download the new version and add it to the project again, which is very troublesome. If you have any tools to solve these annoying problems, it will be "easy to understand ". So you need CocoaPods.
CocoaPods should be the most commonly used and famous class library management tool for iOS. The two annoying problems mentioned above can be completely solved through cocoaPods with only one line of commands, the premise is that you must set it correctly. Most famous open-source libraries support CocoaPods. Therefore, as iOS programmers, it is essential to master the use of CocoaPods.
CocoaPods Installation
Cocoapods Installation Process
1. gem sources -- remove https://rubygems.org/delete previous source
2. gem sources-a https: // ruby: taobao.org/replace the New Source (http is often used on the Internet, which is a previous one. Now https is needed)
3. gem sources-l checks the Current Source
4. update and upgrade the gem (if any problem occurs in the future, try this)
Sudo gem update-system
5. Install
Sudo gem install cocoapods
The following is a good tutorial (my computer above is not good)
Sudo gem install-n/usr/local/bin cocoapods
6. Initialization
Pod setup
This takes a while.
About 5 minutes, maybe faster.
To be continued, learn how to use it next time