iOS开发之pod的版本回退

来源:互联网 发布:oracle数据库代理商 编辑:程序博客网 时间:2024/06/09 23:14

项目中直接使用了pod的安装命令

sudo gem install cocoapods

结果安装的1.2.1版本,同事都用的1.1.1版本。
跟同事的pod版本不一致,git就会一直提示到有这个修改,很烦人。

解决办法:
查看当前pod版本:

pod --version//1.2.1

直接下载想要的pod版本:

sudo gem install cocoapods --version 1.1.1

删除不想要的版本:

sudo gem uninstall cocoapods/*Select gem to uninstall: 1. cocoapods-1.1.1 2. cocoapods-1.2.1 3. All versions*/> 2//Successfully uninstalled cocoapods-1.2.1

再次查看当前pod版本:

pod --version//1.1.1

执行一次当前pod的install命令

pod install//*Analyzing dependencies[!] The version of CocoaPods used to generate the lockfile (1.2.1) is higher than the version of the current executable (1.1.1). Incompatibility issues may arise.Downloading dependencies*/

执行完成之后,git的修改提示就解决了

原创粉丝点击