Pod基本命令
Pod 和终端命令
参考网址:http://blog.csdn.net/wzzvictory?viewmode=contents
pod升级1.0.0注意事项:http://www.jianshu.com/p/a45b8b708ecb
1、pod命令
ctrl-z 挂起正在运行的进程
ctrl-d 发送EOF
ctrl-c 结束进程
2、pod install 被墙了,请大家换成
pod install --verbose --no-repo-update
pod update --verbose --no-repo-update
pod install --verbose --no-repo-update
3、pod安装
10.11 cocoapods安装 sudo gem install -n /usr/local/bin cocoapods
sudo gem install -n /usr/local/bin cocoapods
PodFile
platform :ios, '7.0'
pod 'SBJson', '~> 4.0.2'
pod 'Reachability', '~> 3.2'
新版1.0.0版本
target :‘PodNew1.0.0’ do
platform :ios, ‘7.0’
pod 'AFNetworking'
end
https://guides.cocoapods.org/using/the-podfile.html
pod安装
1、sudo gem install cocoapods //安装
2、 gem sources --remove https://rubygems.org/ //替换淘宝途径
gem sources --remove http://ruby.taobao.org/
gem sources -a https://ruby.taobao.org/
gem sources --remove http://ruby.taobao.org/ --add https://ruby.taobao.org/
检查成功:
gem sources -l
pod 卸载
sudo gem uninstall cocoapods -v 0.38.2
更新pod1.0
出现ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
那么请用
sudo gem install -n /usr/local/bin cocoapods --pre
问题:无限卡住Setting up CocoaPods master repo
1、cd ~/.cocoapods/repos
2、git clone https://github.com/CocoaPods/Specs master
pod 1.2.0beta版本
参考链接:http://www.jianshu.com/p/c4dd858d816c
查看下载进度
➜ ~ cd ~/.cocoapods/
➜ .cocoapods du -sh *
1、先切换gem源
gem sources --remove https://rubygems.org/
gem source -a https://gems.ruby-china.org
2、查看是否切换成功
gem source -l
3、安装
sudo gem install -n /usr/local/bin cocoapods --pre
4、检查版本
pod --version
5、设置pod仓库
pod setup
pod gem source
https://gems.ruby-china.org/
找不到最新类库的解决办法
pod repo update --verbose
pod repo --verbose 错误
/Library/Ruby/Site/2.0.0/rubygems.rb:270:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException) from /Library/Ruby/Site/2.0.0/rubygems.rb:298:in `activate_bin_path' from /usr/local/bin/pod:22:in `<main>'
解决方案:
sudo gem install activesupport -v 4.2.6 sudo gem install cocoapods