问题
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