當你遇到下面的場景時就表示需要升級Cocoapods了
the version of cocoapods used to generate the lockfile (1.9.1) is higher than the version of ...
可以查看下自己的
cocoapods
版本號
執行命令:pod --version
結果:1.8.4
查看cocoapods源
執行命令:gem sources -l
結果:
*** CURRENT SOURCES ***
https://gems.ruby-china.com
- 安裝或者更新cocoapods
執行命令:sudo gem install cocoapods
接著輸入電腦登錄密碼
結果:
Fetching ffi-1.12.2.gem
Fetching ethon-0.12.0.gem
Fetching cocoapods-core-1.9.1.gem
Fetching xcodeproj-1.15.0.gem
Fetching cocoapods-1.9.1.gem
Fetching typhoeus-1.3.1.gem
Building native extensions. This could take a while...
Successfully installed ffi-1.12.2
Successfully installed ethon-0.12.0
Successfully installed typhoeus-1.3.1
Successfully installed cocoapods-core-1.9.1
Successfully installed xcodeproj-1.15.0
Successfully installed cocoapods-1.9.1
Parsing documentation for ffi-1.12.2
Installing ri documentation for ffi-1.12.2
Parsing documentation for ethon-0.12.0
Installing ri documentation for ethon-0.12.0
Parsing documentation for typhoeus-1.3.1
Installing ri documentation for typhoeus-1.3.1
Parsing documentation for cocoapods-core-1.9.1
Installing ri documentation for cocoapods-core-1.9.1
Parsing documentation for xcodeproj-1.15.0
Installing ri documentation for xcodeproj-1.15.0
Parsing documentation for cocoapods-1.9.1
Installing ri documentation for cocoapods-1.9.1
Done installing documentation for ffi, ethon, typhoeus, cocoapods-core, xcodeproj, cocoapods after 33 seconds
6 gems installed
- 更新完之后,查看下pod版本號
執行命令:pod --version
結果:1.9.1
到此,cocoapods升級完成了。