Exclude a pod from updating

非 Y 不嫁゛ 提交于 2019-12-07 02:28:58

问题


I use Cocoapods. I have made some changes to a 3rd party library and if I run pod update, all those changes would get replaced. Running pod install does the same thing.

Is there a way to exclude a pod from updating? Or a way to install a single pod without affecting others?


回答1:


At last Found the Solution.

It will install pod without any repository update if you already have the library in the project,else will download

pod install --no-repo-update 

If you want to update specific libraries you can use :

pod update [POD_NAME...]



回答2:


Yes, just specify the version you want to install, like if you want to keep using AFNetworking 1.3 and not upgrade to 2.*:

pod 'AFNetworking', '~> 1.3.2'



回答3:


Please check this discussion: https://github.com/CocoaPods/CocoaPods/issues/760

One possible solution for now to update only a single pod would be:

Remove specific pod from Podfile
pod install
Re-add specific pod to Podfile
pod install


来源:https://stackoverflow.com/questions/24258056/exclude-a-pod-from-updating

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!