1. Install xcode
2. Install commad line tools command xcode-select --install
Check that the ruby version is too low (a low version will lead to unsuccessful installation of cocoapods) and use the following rvm management
ruby -v
3. Use rvm to manage ruby and install rvm
curl -L get.rvm.io | bash -s stable
source ~ / .rvm / scripts / rvm
rvm -v (the version number appears to indicate success)
4.rvm gets the remote ruby version
rvm list known
5. Install the specified version of ruby
rvm install 2.3.0
6. Download slow modify ruby mirror address
gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
gem sources -l (only contains https://gems.ruby-china.org/ correct)
7. Execute 5
8. Set the ruby downloaded by the current rvm as the default ruby
rvm use 2.3.0 --default
9. Install cocoapods (https://cocoapods.org/)
sudo gem install cocoapods
(If the download is slow do not do 6 actions do 6 actions)
10. Search controls
pod search afnetworking (will be in a waiting state)
cd ~/.cocoapods/ (enter the control library directory and the search command will prompt after the download is complete)
du -sh *
11. Control installation (not updated)
pod install --verbose --no-repo-update
Control installation (update)
pod install
For use, please refer to http://www.sxt.cn/u/10014/blog/6448
cd /ios-demo/TestBeehive
touch Podfile
vi Podfile
Subfiles:
========
platform :ios, '7.0'
target "TestBeehive" do
pod 'BFPaperButton', '~> 2.0'
under 'FSMediaPicker', '~> 0.0.2'
under 'AFNetworking', '~> 2.5.0'
under 'JSONKit', '~> 1.5pre'
pod 'SDWebImage-Category', '~> 1.4'
pod 'Reachability', '~> 3.2'
under 'MJRefresh', '~> 1.4.6'
under 'SDWebImage', '~> 3.7'
under 'JSONModel', '~> 1.1.0'
under 'HMSegmentedControl'
pod 'FMDB', '~> 2.5'
under 'LKDBHelper', '~> 2.1.3'
under 'RQShineLabel'
pod "BeeHive", '1.0.0'
end
pod install
Solve the problem of not generating xcworkspace update pod
pod COMMAND --version
sudo gem install cocoapods --pre
jsonkit isa problem ( note that it is modified on the pod project )
http://blog.csdn.net/timtian008/article/details/50778719