Ans : After first time run pod install, Podfile.lock will be generated.
The purpose of Podfile.lock is tracking of every version of every library that Cocoapods has installed for you, especially working together with a team.
In team there are two guys working, Narendra and Amit.
Everyone should take care while hitting command pod install and pod update. Choose wisely between those. While update pod update, we should ask to our teammate.
Another nice feature is cocoapods will create a snapshot of every library while using source control.
Understand from : Video
The purpose of Podfile.lock is tracking of every version of every library that Cocoapods has installed for you, especially working together with a team.
In team there are two guys working, Narendra and Amit.
- Narendra has made project and install library named Demo Library Version 1.3.3
- After some days, Demo Library is updated to 1.4.0. and Narendra not hit command pod update as he is happy with 1.3.3
- Amit copy narendra's project and hit command pod install, then 1.4.0 will be installed(if Podfile.lock is not there).
- So here is how Podfile.lock work, record the version of what Narendra had installed, then cocoapods will check what version Narendra had installed and then install on Amit's project. (1.3.0)
- But if Amit hit command pod update, then in pod.lock file, version changed to 1.4.0 .
So Podfile.lock file should not be deleted if we work on team. And so Podfile.lock file should be checked while using source control.
Everyone should take care while hitting command pod install and pod update. Choose wisely between those. While update pod update, we should ask to our teammate.
Another nice feature is cocoapods will create a snapshot of every library while using source control.
Understand from : Video
No comments:
Post a Comment
Thanks