I have a list of libraries in my Pod file. I decide to add new one to Pod file. But I want to keep all my previous libraies without updates and just install (add) this one library
pod 'JSAnimatedImagesView', '~> 1.0.0'
so pod update
and pod install
update all libraries to newer versions, but I don't want to update them just install pod 'JSAnimatedImagesView', '~> 1.0.0'
When you run pod update PODNAME , CocoaPods will try to find an updated version of the pod PODNAME , without taking into account the version listed in Podfile. lock . It will update the pod to the latest version possible (as long as it matches the version restrictions in your Podfile ).
pod install --no-repo-update
This installs new items without updating existing repos (versioned or not).
It's also just quicker if you have a lot of repos and want a fast install of a new item.
(As of March 15, 2019)
To install 1 new pod: add the 1 desired new pod into your Podfile. Then run:
pod install --no-repo-update
It will not update any other pods when running this.
If you don't want to update the specific libraries you should lock them at the versions you want to keep
pod 'AFNetworking', '1.2.0'
pod 'JSAnimatedImagesView', '~> 1.0.0'
Would keep AFNetworking
on V1.2.0 but get the latest JSAnimatedImagesView
This makes the podfile transferrable to other locations (and developers) and saves you from forgetting to revert your podfile until you intend to update pods
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With