I am trying to update my pod using pod install
and finding that it doesn\'t update properly unless I delete the original pod.
Is t
I think reader of this Question must understand difference between
pod install vs. pod update
Many people starting with CocoaPods seems to think that pod install
is only used the first time you setup a project using CocoaPods and pod update
is used afterwards. But that's not the case at all.
pod install
to install new pods in your project. Even if you already have a Podfile and ran pod install
before; so even if you are just adding/removing pods to a project already using CocoaPods.pod update [PODNAME]
only when you want to update specific pod to a newer version. pod update
only when you want to update every pod to a newer available version. Every time the pod install
command is run — and downloads and install new pods — it writes the version it has installed, for each pods, in the Podfile.lock
file. This file keeps track of the installed version of each pod and locks those versions.
When you run pod install
, it only resolves dependencies for pods that are not already listed in the Podfile.lock
.
For pods listed in the Podfile.lock
, it downloads the explicit version listed in the Podfile.lock
without trying to check if a newer version is available
For pods not listed in the Podfile.lock
yet, it searches for the version that matches what is described in the Podfile (like in pod 'MyPod', '~>1.2'
)