gem升級(jí)
sudo gem update --system
pod安裝
gem sources --remove https://rubygems.org/ //去掉ruby軟件源
gem sources -a https://ruby.taobao.org/ //添加淘寶的源
gem sources -l //查看ruby軟件源
sudo gem install cocoapods
符號(hào)
~>0.1 大于等于0.1 小于1
~>0.1.1大于等于0.1.1小于0.2
其他不解釋
pod安裝升級(jí)卡可不升級(jí)本地庫
pod install --verbose --no-repo-update
pod中使用ruby
ruby語法隨便用如:
platform :ios,'7.0'
def mypod(xxx)
target xxx do
pod 'Masonry', '~> 0.6.1'
pod 'MJRefresh', '~> 2.0.4'
pod 'MBProgressHUD', '~> 0.9.1'
pod 'MWPhotoBrowser', '~> 2.1.1'
pod 'QBImagePickerController', '~> 2.5.2'
pod 'SDWebImage', '~> 3.7.3'
pod 'BaiduMapKit'
pod 'MJExtension'
pod 'UMengAnalytics'
pod 'AFNetworking'
end
end
mypod("工程名")
mypod("工程名Debug")
mypod("工程名Pre")