CocoaPodsの使用とインストールに関するよくある問題の修復
2172 ワード
, EaseUI, , , pods , ,
podsの使用は非常に簡単で便利です
inhibit_all_warnings!
pods編集のフォーマットsource 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'ProductName' do
end```
1.` ,cd , `
2.` vim podfile, podfile `
3.` i `
4.` ESC :wq `
5.` pod install `
***
pod
* ` `
![12A56E49-D766-4293-925E-85149D99736F.png](http://upload-images.jianshu.io/upload_images/5678657-28480540f73353cc.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
* ` , https://gems.ruby-china.org/`
[gems.ruby-china](https://gems.ruby-china.org/)
![CDC0784C-7209-4034-AA9D-9D6368538F08.png](http://upload-images.jianshu.io/upload_images/5678657-93592dca4c93c014.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
***
pods ,
1. ruby :
` gem sources -l `
![B950F60E-C7D0-4E89-B5D1-C145A9545543.png](http://upload-images.jianshu.io/upload_images/5678657-575dd7e67769c457.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) , pods org , 3`( , )`
2. ruby :
`gem sources --remove https://rubygems.org/`
remove , `https://gems.ruby-china.org`,
3. ruby
`gem sources -a https://gems.ruby-china.org/ `
4. ruby, , `https://gems.ruby-china.org`
`gem sources -l `
5. cocoapods
`sudo gem install -n/usr/local/bin cocoapods --pre `
6. pods `( pods )`
`pod --version`
***
* Ruby , [ RVM ](https://github.com/huacnlee/init.d/blob/master/install_rvm) Ruby, , `( )`, pods
* `setup` ,
* `vim podfile` `podfile` , `Podfile.lock` `(Podfile.lock pods , )`
* SSL , , `http://gems.ruby-china.org ` SSL
*` Bundler::GemspecError: Could not read gem at /home/xxx/.rvm/gems/ruby-2.1.8/cache/rugged-0.23.3.gem. It may be corrupted` ,
*