ポッドインストールVS。ポッドの更新



Pod Install Vs Pod Update



What is the difference between pod install and pod update? When do you use pod install? When do you use pod update? ...... Some people may want to ensure that the rest of the team has the same version by specifying the exact version number of the pod in their Podfile, such as pod ‘a’, ‘1.0.0’. Then even if they use pod update, even if a new pod is added, it is considered that there will be no risk of updating to other pods because they have already bound to the specified version in the Podfile. But in fact, this is not enough to ensure that User 1 and User 2 mentioned in the above scenario always get the same version of all pods. A typical example is if pod A relies on A2 - there is a declaration of dependency ‘A2’, ‘~> 3.0’ in A.podspec. At this point, using pod ‘A’,’1.0.0’ in the Podfile does force both User 1 and User 2 to always use the 1.0.0 version of pod A, but: User 1 may end up with version 3.4 of pod A2 (because this is the latest version of A2 at that time), and when user 2 joins the project to run pod install later, He may get the 3.5 version of pod A2 (because the maintainer of A2 may have released a new version during this time). That's why the only way to ensure that every team member can use the same version of the pod library on their respective computers is to use Podfile.lock. And use pod install and pod update correctly.