cocoapods降级版本、卸载当前版本
sudo gem uninstall cocoapods
下载旧版本
sudo gem install cocoapods -v 0.25.0
Cocoapods 升级到指定版本
1 升级 ruby - 升级至2.2.2以上
$ ruby -v
1
1.1 RVM安装
$ curl -L get.rvm.io | bash -s stable
1
1.2 验证
$ source ~/.bashrc
$ source ~/.bash_profile
1
2
3
1.3 列出ruby的版本
$ rvm list known
1
1.4 安装ruby 2.2.4
$ rvm install 2.2.4
1
1.5 验证安装版本
$ ruby -v
1
2 换gem源
2.1 移除旧源:
如果之前是 https://rubygems.org/ 源
$ gem sources --remove https://rubygems.org/
1
如果之前是 https://ruby.taobao.org/ 源
$ gem sources --remove https://ruby.taobao.org/
1
2.2 可以先执行一次系统更新操作
$ sudo gem update --system
1
2.3 切换gem源
gem sources -l
1
3 升级 CocoaPods 1.3.1
下面两种安装方式二选一,推荐第一种:
安装指定版本 1.3.1(推荐)
$ sudo gem install -n /usr/local/bin cocoapods -v 1.3.1
1
安装最新版本
$ sudo gem install -n /usr/local/bin cocoapods --pre
qingdeMacBook-Pro:shiguangxu qing
qingdeMacBook-Pro:shiguangxu qing
qingdeMacBook-Pro:shiguangxu qing
qingdeMacBook-Pro:shiguangxu qing
qingdeMacBook-Pro:shiguangxu qing
qingdeMacBook-Pro:repos qing
qingdeMacBook-Pro:repos qing
qingdeMacBook-Pro:repos qing cd /Users/qing/Desktop/gitlab/shiguangxu
qingdeMacBook-Pro:shiguangxu qing$ pod install
Analyzing dependencies
Pre-downloading: DRBasicKit
from https://gitlab.com/sqhua/drbasickit.git
Pre-downloading: DRLDataKit
from git@gitlab.shiguangxu.com:platform_shiguangxu/DRLDataKit.git
Pre-downloading: LTNavigationBar
from https://github.com/JeasonL/LTNavigationBar.git
Pre-downloading: SDVersion
from https://github.com/cguess/SDVersion
Pre-downloading: UITableView+FDTemplateLayoutCell
from https://github.com/forkingdog/UITableView-FDTemplateLayoutCell.git
Downloading dependencies
Using AFNetworking (3.2.1)
Using AliyunOSSiOS (2.6.5)
Using Aspects (1.4.1)
Using BaiduMapKit (4.3.0)
Using BlocksKit (2.2.5)
Using DFEvalKit (0.1.1)
Using DFYBPopupMenu (1.1.3)
Installing DRBasicKit 0.1.8
Installing DRLDataKit (0.1.05)
Using DownloadButton (0.1.0)
Using FMDB (2.7.5)
Using FSCalendar (2.8.0)
Using FunctionalObjC (1.0.2)
Using GPUImage (0.1.7)
Using HMSegmentedControl (1.5.5)
Using HexColors (4.0.0)
Installing IQKeyboardManager 6.4.0 (was 6.3.0)
Using JCore (1.2.6)
Using JPush (3.1.2)
Using JXExtension (0.4.0)
Using LJContactManager (1.0.6)
Installing LTNavigationBar 2.1.9
Using MGSwipeTableCell (1.6.8)
Using MJExtension (3.0.17)
Using MJRefresh (3.2.0)
Using MXParallaxHeader (0.6.1)
Using Masonry (1.0.2)
Using NJKWebViewProgress (0.2.3)
Using PINCache (3.0.1-beta.6)
Installing PINOperation 1.1.2 (was 1.1.1)
Using PINRemoteImage (3.0.0-beta.13)
Using RTRootNavigationController (0.7.1)
Using RegExCategories (1.0)
Using SAMKeychain (1.5.3)
Using SDCycleScrollView (1.75)
Installing SDVersion 4.3.2
Using SDWebImage (4.4.6)
Using SSZipArchive (2.2.2)
Using SVProgressHUD (2.2.5)
Using SwipeView (1.3.2)
Using TCBlobDownload (2.1.1)
Using TTTAttributedLabel (2.0.0)
Using TYPagerController (2.1.2)
Using Texture (2.7)
Using UICollectionViewLeftAlignedLayout (1.0.2)
Installing UITableView+FDTemplateLayoutCell 1.6
Using UMengAnalytics (4.2.4)
Using UMengUShare (6.4.8.2)
Using WebViewJavascriptBridge (6.0.3)
Using YTKNetwork (2.0.4)
Using YYCache (1.0.4)
Using YYModel (1.0.4)
Using YYText (1.0.7)
Using lottie-ios (1.5.2)
Using pop (1.0.12)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 54 dependencies from the Podfile and 55 total pods installed.
[!] Smart quotes were detected and ignored in your Podfile. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
[!] The 时光序DataTests [Debug]
target overrides the GCC_PREPROCESSOR_DEFINITIONS
build setting defined in Pods/Target Support Files/Pods-时光序DataTests/Pods-时光序DataTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
$(inherited)` flag, or
- Remove the build settings from the target.
[!] The 时光序DataTests [Release]
target overrides the GCC_PREPROCESSOR_DEFINITIONS
build setting defined in Pods/Target Support Files/Pods-时光序DataTests/Pods-时光序DataTests.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the