We all know that third-party libraries, which generally use cocoapods management, have a great role to play in the development of our iOS cocoapods.
Okay, now look at it. Installation steps: 1. Open terminal, enter
sudo gem install Cocoapods
Results:
Double using " Mans sudo " for more information. To proceed, enter your password, or type ctrl-c to abort. Password: (Enter password for this machine)
2. After entering the password, press ENTER to build, wait ...
Results:
' Cocoapods ' 0 is why:unable to download data from https://rubygems.org/-errno::etimedout:operation timed out- Connect (2) (https://rubygems.org/latest_specs.4.8.gz
3. Enter
Gem sources--remove HTTPS//
Press ENTER to build the result:
SOURCE HTTPS//Rubygems.org/not present in cache
4. Enter
Gem sources-a http://
Results:
http://ruby.taobao.org/added to sources
5. Input (remove some unnecessary)
Gem sources--remove https://rubygems.org/
Results:
HTTPS://
6. Enter
Gem Sources-l
Results:
Current SOURCES * * * http://ruby.taobao.org/
7. Enter
Results:
-bash:pod:command not found
8. Re-execution:
sudo gem install Cocoapods
Results
Password: (Enter password for this machine) result; it is a series of data update ... Wait
9. Enter
Results
10. (Search, case-insensitive, write more detailed, find path more precise) input
Pod Search Afnetwork
Result: a bunch of things about (afnetwork) (search results)
11. In this step, we need to build our own project, and then in the terminal input CD (remember the space behind the CD) to drag the project files here. Press ENTER to build
12. Enter
VI Podfile
Press ' I ' into the edit state, here are some of the things you want to edit: (that is, you want to update those third party libraries)
12'reachability','~>3.1.0' 34 platform:ios,'6.0'5'afnetworking ','~> 2.3.1'
After editing, press ' ESC ' and press ' shift+: ', type Wq (save exit)
13. Update, enter
14. Installation, input
After completing the above steps (the project will be more files), to the project file open. xcworkspace files, you can, need to use, just add the header file is OK.
IOS Cocoapods Installation and use