CocoaPods详解 -- Mark
CocoaPods详解之----使用篇 : http://blog.csdn.net/wzzvictory/article/details/18737437
CocoaPods详解之----进阶篇 : http://blog.csdn.net/wzzvictory/article/details/19178709
CocoaPods详解之----制作篇 : http://blog.csdn.net/wzzvictory/article/details/20067595
其它参考:http://www.cnblogs.com/wayne23/p/3912882.html
cocoapos配置过程代码笔记:
Last login: Tue Aug 11 15:06:20 on ttys000 weajan:~ moyazi$ ruby --version ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14] weajan:~ moyazi$ weajan:~ moyazi$ gem sources --remove https://rubygems.org/ https://rubygems.org/ removed from sources weajan:~ moyazi$ gem sources -a http://ruby.taobao.org/ http://ruby.taobao.org/ added to sources weajan:~ moyazi$ gem sources -l *** CURRENT SOURCES *** http://ruby.taobao.org/ weajan:~ moyazi$ sudo gem install cocoapods Password: Fetching: i18n-0.7.0.gem (100%) Successfully installed i18n-0.7.0 Fetching: thread_safe-0.3.5.gem (100%) Successfully installed thread_safe-0.3.5 Fetching: tzinfo-1.2.2.gem (100%) Successfully installed tzinfo-1.2.2 Fetching: minitest-5.8.0.gem (100%) Successfully installed minitest-5.8.0 Fetching: activesupport-4.2.3.gem (100%) Successfully installed activesupport-4.2.3 Fetching: nap-0.8.0.gem (100%) Successfully installed nap-0.8.0 Fetching: fuzzy_match-2.0.4.gem (100%) Successfully installed fuzzy_match-2.0.4 Fetching: cocoapods-core-0.38.2.gem (100%) Successfully installed cocoapods-core-0.38.2 Fetching: claide-0.9.1.gem (100%) Successfully installed claide-0.9.1 Fetching: colored-1.2.gem (100%) Successfully installed colored-1.2 Fetching: xcodeproj-0.26.3.gem (100%) Successfully installed xcodeproj-0.26.3 Fetching: cocoapods-downloader-0.9.1.gem (100%) Successfully installed cocoapods-downloader-0.9.1 Fetching: cocoapods-plugins-0.4.2.gem (100%) Successfully installed cocoapods-plugins-0.4.2 Fetching: cocoapods-stats-0.5.3.gem (100%) Successfully installed cocoapods-stats-0.5.3 Fetching: cocoapods-try-0.4.5.gem (100%) Successfully installed cocoapods-try-0.4.5 Fetching: netrc-0.7.8.gem (100%) Successfully installed netrc-0.7.8 Fetching: cocoapods-trunk-0.6.1.gem (100%) Successfully installed cocoapods-trunk-0.6.1 Fetching: molinillo-0.3.1.gem (100%) Successfully installed molinillo-0.3.1 Fetching: escape-0.0.4.gem (100%) Successfully installed escape-0.0.4 Fetching: cocoapods-0.38.2.gem (100%) Successfully installed cocoapods-0.38.2 Parsing documentation for i18n-0.7.0 Installing ri documentation for i18n-0.7.0 Parsing documentation for thread_safe-0.3.5 Installing ri documentation for thread_safe-0.3.5 Parsing documentation for tzinfo-1.2.2 Installing ri documentation for tzinfo-1.2.2 Parsing documentation for minitest-5.8.0 Installing ri documentation for minitest-5.8.0 Parsing documentation for activesupport-4.2.3 unable to convert "\x84" from ASCII-8BIT to UTF-8 for lib/active_support/values/unicode_tables.dat, skipping Installing ri documentation for activesupport-4.2.3 Parsing documentation for nap-0.8.0 Installing ri documentation for nap-0.8.0 Parsing documentation for fuzzy_match-2.0.4 Installing ri documentation for fuzzy_match-2.0.4 Parsing documentation for cocoapods-core-0.38.2 Installing ri documentation for cocoapods-core-0.38.2 Parsing documentation for claide-0.9.1 Installing ri documentation for claide-0.9.1 Parsing documentation for colored-1.2 Installing ri documentation for colored-1.2 Parsing documentation for xcodeproj-0.26.3 Installing ri documentation for xcodeproj-0.26.3 Parsing documentation for cocoapods-downloader-0.9.1 Installing ri documentation for cocoapods-downloader-0.9.1 Parsing documentation for cocoapods-plugins-0.4.2 Installing ri documentation for cocoapods-plugins-0.4.2 Parsing documentation for cocoapods-stats-0.5.3 Installing ri documentation for cocoapods-stats-0.5.3 Parsing documentation for cocoapods-try-0.4.5 Installing ri documentation for cocoapods-try-0.4.5 Parsing documentation for netrc-0.7.8 Installing ri documentation for netrc-0.7.8 Parsing documentation for cocoapods-trunk-0.6.1 Installing ri documentation for cocoapods-trunk-0.6.1 Parsing documentation for molinillo-0.3.1 Installing ri documentation for molinillo-0.3.1 Parsing documentation for escape-0.0.4 Installing ri documentation for escape-0.0.4 Parsing documentation for cocoapods-0.38.2 Installing ri documentation for cocoapods-0.38.2 20 gems installed weajan:~ moyazi$ weajan:~ moyazi$ weajan:~ moyazi$ weajan:~ moyazi$ ls /usr/bin/po ls: /usr/bin/po: No such file or directory weajan:~ moyazi$ ls /usr/bin/po ls: /usr/bin/po: No such file or directory weajan:~ moyazi$ ls /usr/bin/pod /usr/bin/pod weajan:~ moyazi$ sudo chmod 777 /usr/local/pod Password: chmod: /usr/local/pod: No such file or directory weajan:~ moyazi$ sudo chmod 777 /usr/bin/pod weajan:~ moyazi$ weajan:~ moyazi$ weajan:~ moyazi$ ls Applications Downloads Music 百度云同步盘 Desktop Library Pictures Documents Movies Public weajan:~ moyazi$ cd /Users/moyazi/Desktop/cocoapodsTest weajan:cocoapodsTest moyazi$ ls cocoapodsTest cocoapodsTest.xcodeproj cocoapodsTestTests weajan:cocoapodsTest moyazi$ cd ../ weajan:Desktop moyazi$ ls -the-swift-programming-language-.pdf MoodBox开发文档.doc ASR.png SPlayerX.app DDMS VDMS DLNA资料 cocoapodsTest Git 杂项 Leoo_work weajan:Desktop moyazi$ cd /Users/moyazi/Desktop/cocoapodsTest weajan:cocoapodsTest moyazi$ ls Podfile cocoapodsTest cocoapodsTest.xcodeproj cocoapodsTestTests weajan:cocoapodsTest moyazi$ pod install Updating local specs repositories Creating shallow clone of spec repo `master` from `https://github.com/CocoaPods/Specs.git` Analyzing dependencies Downloading dependencies Installing pop (1.0.7) Generating Pods project Integrating client project [!] Please close any current Xcode sessions and use `cocoapodsTest.xcworkspace` for this project from now on. Sending stats weajan:cocoapodsTest moyazi$ weajan:cocoapodsTest moyazi$
升级Mac系统后pod命令报错,情况如下:
ERROR: Could not find a valid gem 'cocospods’ (>= 0), here is why:
Unable to download data from http://ruby.taobao.org/ - bad response Not Found 404 (http://ruby.taobao.org/latest_specs.4.8.gz)
解决办法:
将http 替换成 https
1.gem sources --remove http://ruby.taobao.org/
2.gem sources -a https://ruby.taobao.org/
3.查看源对不对
gem sources -l
4.再安装就好了
sudo gem install cocoapods