当你遇到下面的场景时就表示需要升级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升级完成了。