问题描述执行gem sources -remove https://ruby.taobao.org/,提示
source emove not present in cache
解决办法,执行
gem sources --remove https://ruby.taobao.org/
在更新Cocoapods时遇到的一些问题:
- 问题1:You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
目录权限不够,解决方案
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:更新后还是不行,执行
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