Cocoapods: Update a specific pod in dependicies
I want to update only a specific SDK or a library from Cocoa pods dependency manager.
✅ First, check the version of the pod that you wish to update
- Open Podfile.lock
Podfile.lock keeps track of the resolved versions of each Pod installed, it’s not advisable to edit this file & it’s generated when performing pod operations such as install or update.
⛵️Next, let’s update the version of the Pod
- Open terminal & cd <PROJECT_DIR>
pod update POD_NAME
pod update
will NOT respect thepodfile.lock
. It will override it.
Alternatively if you wish to update to a specific version of a Pod
- Open Podfile
pod 'POD_NAME', 'POD_VERSION'
In terminal, perform pod install