CocoaPods get current versions of dependencies

I have a project that uses CocoaPods. My subfile defines the required dependencies, however I did not specify the versions to use.

I would like to add explicit versions of the dependencies to my subfile so that when used pod install

after checking out my project on a new machine, it will always retrieve my current version of the Pod dependencies from CocoaPods.

Is there a way to quickly check which version of each Pod dependency I currently have in the project directory?

+3


source to share


1 answer


The only way to update installed versions of your modules is to run pod update

. If you don't, all of the current version information is kept in Podfile.lock

and will ensure that the versions are the same between installations.

This file is also the best place to look for these versions if you want to add them. In yours, Podfile.lock

you will see a list like this:



PODS:
  - EasyMapping (0.6.3)
  - Expecta (0.3.1)
  - OCMock (3.1.1)
  - OHHTTPStubs (3.1.6):
    - OHHTTPStubs/Core
  - OHHTTPStubs/Core (3.1.6)
  - Specta (0.2.1)

      

The top-level entries (on the left) are the containers you specified in yours Podfile

. As you can see on the right, this is the installed version. You can take the versions here and put them in Podfile

.

+5


source







All Articles