1. Problems encountered installing Cocoapod now mirror source pit code

--add https://ruby.taobao.org/ --remove https://rubygems.org/
Copy the code

This is a problem, Taobao mirror has been unable to use and will package SSL error as shown:

gem sources --add https://gems.ruby-china.com
Copy the code

2. Check the current address

gem sources -l 
Copy the code

--remove https://gems.ruby-china.org/
Copy the code

Then the implementation can execute the Cocoapods installation code

sudo gem install cocoapods
Copy the code

Enter your computer password and follow the picture

pod setup 
Copy the code

And then I’m going to do a random search, but the first search takes a little bit longer because I need to download the index library, so I’m just going to wait and I’m going to attach the search command

Pod Search The name of the library you are looking forCopy the code

Create a project and try the empty project CD project directory and then pod Init. Then you will see podFile. Then pod install will generate pod project files