OriginalHttp://www.cnblogs.com/zxs-19920314/p/4985476.html
Installation process for IOS latest version CocoaPods
1. Remove the existing Ruby default source
$gem sources--remove https://rubygems.org/
2. Use the new source
$gem sources-a https://ruby.taobao.org/
3. Verify that the Xinyuan is replaced successfully
$gem sources-l
4. Installing Cocoapods
(1) $sudo gem install Cocoapods
Note: After upgrading OS X EL Capitan, the Apple system changes to $sudo gem install-n/usr/local/bin cocoapods
(2) $pod Setup
5. Update the GEM
$sudo Gem Update--system
6. Create a new project and use the CD instruction in the terminal to the folder
$pod Search Third Party
7. New file Vim "Podfile",
$vim Podfile
Write the following and save the tip: (the terminal vim file can be edited by I, ESC exits edit: Wq can be saved exit)
Platform:ios, ' 6.0 '
Pod ' afnetworking ', ' ~> 2.3.1 ' <-------third party
8. Import third-party libraries
$pod Install
9. Exit the terminal
Here are some of the errors I encountered when I installed with the previous installation process
Terminal cocoapods download Bug debug:
Error 1:
Error fetching http://ruby.taobao.org/:
Bad response not Found 404 (http://ruby.taobao.org/specs.4.8.gz)
Solution: Change the installation process $gem sources-a http://ruby.taobao.org/---to----> $gem sources-a https://ruby.taobao.org/
Error 2:
Error:while Executing gem ... (errno::eperm)
Operation not permitted-/usr/bin/pod
Solution: The Apple system upgrade OS X EL Capitan will appear after the plug-in error, will install the process 4. Install Cocoapods (1) sudo gem install cocoapods--> to sudo gem install-n/usr/ Local/bin Cocoapods
Error 3:
[!] Unable to satisfy the following requirements:-' Avoscloud (~> 3.1.6.3) ' required by ' podfile '
Specs satisfying the ' Avoscloud (~> 3.1.6.3) ' dependency were found, but they required a higher minimum deployment Targ Et.
Solution: Installation process: Podfile file in Platform:ios, ' 6.0 ' behind the 6.0 is the platform version number, be sure to add
Installation process for the latest version of CocoaPods