Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pod install - Podfile.lock updated

Tags:

cocoapods

I've just cloned a project with several pods locked.

After a pod install my Podfile.lock gets modified.

Why ?

Isn't it supposed to be updated only if I do pod update ?


Podfile

platform :ios, '6.0'
pod 'SVProgressHUD',    '~> 0.9'
pod 'Reachability',     '~> 3.1.0'
pod 'UIDeviceAddition', '~> 1.0'
pod 'CorePlot',         '~> 1.3'
pod 'RestKit',          '~> 0.20'
pod 'ZipArchive',       '~> 1.1.0'

^- not changed -^

Diff

index c82dc53..e408a71 100644
--- a/Podfile.lock
+++ b/Podfile.lock
@@ -1,5 +1,5 @@
 PODS:
-  - AFNetworking (1.3.2)
+  - AFNetworking (1.3.4)
   - CorePlot (1.3)
   - Reachability (3.1.1)
   - RestKit (0.20.3):
@@ -32,14 +32,14 @@ DEPENDENCIES:
   - ZipArchive (~> 1.1.0)

 SPEC CHECKSUMS:
-  AFNetworking: 7f9bcd7c287a75476cd5c61e82fd3380e93e4c54
-  CorePlot: af8307dd1fc013b3d8d97f54db8de0de6d57af84
-  Reachability: 2be6bc2fd2bd31d97f5db33e75e4b29c79e95883
# ...
+  AFNetworking: 80c4e0652b08eb34e25b9c0ff3c82556fe5967b4
+  CorePlot: f62846d49870dcb5a7fffa42f493faf836155578
+  Reachability: 8e9635e3cb4f98e7f825e51147f677ecc694d0e7
# ...

-COCOAPODS: 0.22.3
+COCOAPODS: 0.33.1
like image 430
Pierre de LESPINAY Avatar asked May 30 '14 14:05

Pierre de LESPINAY


People also ask

How do you resolve a Podfile lock conflict?

Simply run pod install (or bundle exec pod install if using bundler) to reinstall all the project's pods. This will regenerate the deleted Pods/ folder and create the correct checksum in Podfile. lock . That's it — you've now got both your changes merged, and you've fixed the merge conflict (at least, for the pods!).

Does pod install update?

pod update ignores Podfile. lock when checking for versions. It looks for the the latest available version* of a pod, and installs it if it isn't already installed.

Should I push Podfile lock?

As a reminder, even if your policy is not to commit the Pods folder into your shared repository, you should always commit & push your Podfile. lock file. Otherwise, it would break the whole logic explained above about pod install being able to lock the installed versions of your pods.

What is POD install repo update?

cocoapods-repo-update is a CocoaPods plugin that checks your dependencies when you run pod install and updates the local specs repositories if needed.


1 Answers

This may happen due to various reasons. For example, pod master repo got updated and somebody installed pods after running pod repo update, while on your machine you still have an old version of the repository.

Alternatively, it could also happen if you change the CocoaPods tool version. The checksums changed, this is absolutely normal. Commit the newly created checksums to the repository and continue using newer version of the tool.

like image 88
Richard Topchii Avatar answered Sep 22 '22 00:09

Richard Topchii