Since Xcode7.3, pod has been removed in the upgrade process, and has not been installed since. Then it was installed, and the blogger started installing it. It was very difficult, something has changed. OS X EI Capitan is the OS X EI Capitan system.

Generally speaking you certainly did not turn over the wall, do not consider you directly installed.

MAC OS has Ruby environment, not to say, want to view the current source:

$gem sources -lCopy the code

2. If you haven’t installed it before, your source must be rubygems.org/.

$ gem sources --remove https://rubygems.org/
Copy the code

3. Add the ruby source to the wall after deleting it. Here we use Taobao.

$ gem sources -a https://ruby.taobao.org/
Copy the code

4. To check if the addition is good:

$ gem sources -l
Copy the code

You can see if you have added a good Ruby source.

5. Now you can download and install Pods:

$ sudo gem install cocoapods
Copy the code

If the ruby version is too low, please upgrade and install the latest ruby version according to the Ruby official website. If no problem, go to the next step

Tip: If your gem is a bit old, update it:

$ sudo gem update --system
Copy the code

Installation path:

$ sudo gem install -n /usr/local/bin cocoapods
Copy the code

6. After the previous step is good, no problem can be installed:

$ pod setup
Copy the code

How do I use 7?

$pod init = $pod init = $pod init = $pod init = $pod init = $pod init Platform :ios, '7.0' // pod 'AFNetworking', '~> 3.0' // Add libraries without adding the following number, such as pod 'AFNetworking' // Then add the source source, some people also add target and end flag, this is more complicated, want to find Podfile syntax further. Press ESC to exit, shift+@ :, and enter wq to exit. Use $pod install --verbose --no-repo-update to load CocoaPods spec repositories faster than updating them every timeCopy the code

There are some bugs that the blogger forgot to save, but the problem is nothing more than a new command line, gems need to be updated, pods are too low, these are easy to find and fix, if you encounter a problem that you can’t solve, please leave a comment.