問題描述執(zhí)行g(shù)em sources -remove https://ruby.taobao.org/,提示
source emove not present in cache
解決辦法戚炫,執(zhí)行
gem sources --remove https://ruby.taobao.org/
在更新Cocoapods時遇到的一些問題:
- 問題1:You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
目錄權(quán)限不夠,解決方案
sudo chmod 777 /Library/Ruby/Gems/2.0.0
- 問題2:Permission denied - /Library/Ruby/Gems/2.0.0/cache/rubygems-update-2.6.4.gem
gem版本較低媳纬,更新gem
gem update --system
- 問題3:更新后還是不行双肤,執(zhí)行
sudo gem install cocoapods
- 問題4:Operation not permitted - /usr/bin/xcodeproj
解決方案,
sudo gem install -n /usr/local/bin cocoapods
- 問題5:pod install 時钮惠,提示[!] The dependency
AFNetworking (= 2.5.0)
is not used in any concrete target.
解決方案茅糜,官方給出這樣的格式來更新加載第三方
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'AFNetworking', '~> 2.6'
pod 'ORStackView', '~> 3.0'
pod 'SwiftyJSON', '~> 2.3'
end