Installation and use of CocoaPodshttp ://blog.csdn.net/ysy441088327/article/details/8611731The first step: install Brew<http://blog.csdn.net/ysy441088327/article/details/7940167
> Terminal command: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Step 2: Update Ruby: Update Ruby to the latest version through Brew, OS X already comes with it The Ruby version is low. Terminal command: brew install ruby Step 3: Install CocoaPods via gem //Remove the current version of the gem $ gem sources --remove https://rubygems.org/ //Replace with the new gem version gem //After there is a response, type the following command $ gem sources -a http://ruby.taobao.org/ To verify whether the replacement is successful, you can execute: [objc] view plaincopy View code snippet derivation on CODE go to my snippet // view current gem $ gem sources -l
After the installation is successful, go back to the Shell and enter the following command:
Command: sudo gem install cocoapods
Command: pod setup
Use the Search command to see if the third-party library you need exists!
Command: pod search SDWebImage At
this point, the installation of CocoaPods is complete The
fourth step, use CocoaPods
Next, you need to create a main project. After the establishment is successful, start the terminal again, and use the cd command to enter the project folder. At this time, you need to create a special text file. The command is as follows:
command : touch Podfile Create
command : open -e Podfile open
Write in Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
pod 'MJRefresh'
pod 'AFNetworking
' Import the project
Re- open the terminal, cd project name - enter the project, execute the terminal command:
pod install --verbose --no-repo-update Start to download third-party files and pour them into the project.
About cocopod installation and use documentation
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326947505&siteId=291194637
Ranking