pod降級,升級到指定版本

cocoapods降級版本、卸載當(dāng)前版本
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 驗(yàn)證

$ 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 驗(yàn)證安裝版本

$ 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 可以先執(zhí)行一次系統(tǒng)更新操作

$ sudo gem update --system
1
2.3 切換gem源

gem source -a https://gems.ruby-china.com 1 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 qingpod search SDVersion [!] Unable to find a pod with name, author, summary, or description matching `SDVersion` qingdeMacBook-Pro:shiguangxu qing
qingdeMacBook-Pro:shiguangxu qingqingdeMacBook-Pro:shiguangxu qing
qingdeMacBook-Pro:shiguangxu qingpod repo remove master Removing spec repo `master` qingdeMacBook-Pro:shiguangxu qing
qingdeMacBook-Pro:shiguangxu qingqingdeMacBook-Pro:shiguangxu qing
qingdeMacBook-Pro:shiguangxu qingcd ~/.cocoapods/repos qingdeMacBook-Pro:repos qing
qingdeMacBook-Pro:repos qingqingdeMacBook-Pro:repos qing
qingdeMacBook-Pro:repos qinggit clone --depth 1 https://github.com/CocoaPods/Specs.git master Cloning into 'master'... remote: Enumerating objects: 741260, done. remote: Counting objects: 100% (741260/741260), done. remote: Compressing objects: 100% (458213/458213), done. remote: Total 741260 (delta 180422), reused 711040 (delta 177861), pack-reused 0 Receiving objects: 100% (741260/741260), 110.89 MiB | 149.00 KiB/s, done. Resolving deltas: 100% (180422/180422), done. Checking connectivity: 741260, done. Checking out files: 100% (338232/338232), done. qingdeMacBook-Pro:repos qing
qingdeMacBook-Pro:repos qingqingdeMacBook-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 時(shí)光序DataTests [Debug] target overrides the GCC_PREPROCESSOR_DEFINITIONS build setting defined in Pods/Target Support Files/Pods-時(shí)光序DataTests/Pods-時(shí)光序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 時(shí)光序DataTests [Release] target overrides the GCC_PREPROCESSOR_DEFINITIONS build setting defined in Pods/Target Support Files/Pods-時(shí)光序DataTests/Pods-時(shí)光序DataTests.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the(inherited)` flag, or - Remove the build settings from the target. qingdeMacBook-Pro:shiguangxu qing

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容