87

How to find out the version of installed cocoa pods?

I'm not asking about the version of the cocoa pods gem, but the version of the pods themselves. Ideally it would say "pod GreatViewController is installed in version 1.2.3, new version available: 1.2.6".

Is there something like that?

halfer
  • 19,824
  • 17
  • 99
  • 186
brainray
  • 12,512
  • 11
  • 67
  • 116
  • Possible duplicate of [How to check a version of a CocoaPods framework](https://stackoverflow.com/questions/18931091/how-to-check-a-version-of-a-cocoapods-framework) – Bharath Aug 24 '17 at 08:45

6 Answers6

143

EDIT

Based on your clarification you're looking for pod outdated. You can see more information about this with pod outdated --help

Original answer before question was edited

The command you want is pod --version

In the future you should use pod --help to find answers such as this. You can also use pod COMMAND --help to get help for specific commands.

Keith Smiley
  • 61,481
  • 12
  • 97
  • 110
  • 23
    this is not the answer to the above question. – brainray Nov 04 '14 at 11:18
  • 1
    Thanks Keith. It took me awhile to see that I seemed to have another problem with Cocoapods not accepting my target name. But your anser is right – brainray Nov 10 '14 at 12:02
  • You should open another question if you can't find a solution! – Keith Smiley Nov 10 '14 at 17:11
  • 1
    The Podfile.lock keeps track of the resolved versions of each Pod installed. Note: You should not edit this file. It is auto-generated when you run pod install or pod update – Hrishikesh Sep 21 '16 at 06:26
  • 1
    This is wrong. If you have the latest versions, `pod outdated` prints `No pod updates are available.` – Iulian Onofrei Dec 13 '16 at 14:08
  • The question was specifically for updating the pods. In the case where you just want to see your installed version you should check your `Podfile.lock` – Keith Smiley Dec 27 '16 at 23:23
  • actually, the answer `pod --version` is exactly what I'm looking for when I arrive at this QA. – Chen Li Yong Apr 13 '17 at 06:19
  • The answer doesn't work when the specific goal is to list all installed versions in a user friendly manner. Like another comment said, it displays `No pod updates are available` . – Rodrigo Reis Apr 24 '20 at 19:05
85

You will find the version # in your Podfile.lock of all the pods you are currently using in your project. You will find this file at the same location as your Podfile.

This is how mine looks like:

PODS:
  - Alamofire (3.4.1)
  - EPSignature (1.0.2)
  - Kingfisher (2.4.2)
  - MBProgressHUD (0.9.2)
  - SwiftyJSON (2.3.2)

DEPENDENCIES:
  - Alamofire (~> 3.4)
  - EPSignature
  - Kingfisher
  - MBProgressHUD (~> 0.9.1)
  - SwiftyJSON

SPEC CHECKSUMS:
  Alamofire: 01a82e2f6c0f860ade35534c8dd88be61bdef40c
  EPSignature: 1f925f20b837046de46b4d396bc6e432ea383908
  Kingfisher: 05bf8d04408aaa70fcd2c8c81b9f1d0f1ad313dd
  MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
  SwiftyJSON: 04ccea08915aa0109039157c7974cf0298da292a

PODFILE CHECKSUM: 95eb36b090480f40d91543881d6ddb76bb1b8ca8

COCOAPODS: 1.0.1
koira
  • 1,197
  • 8
  • 10
18

To get the version of cocoa pods

pod --version

To get the version of your pod, look in the Podfile.lock

When you install or update the pod, you can see the versions of both.

Prune
  • 76,765
  • 14
  • 60
  • 81
Learn Swift
  • 570
  • 5
  • 15
12

if You are finding the version of a particular pod installed, then follow below steps:

  1. Open Xcode
  2. Click on "Project Navigator"
  3. Click on "Pods"
  4. Open The Pod you wanna know the version of
  5. Expand it
  6. Expand the "Supporting Files" folder
  7. Click On yourpodname.plist
  8. Read the Bundle Version string, short
11

Open Terminal.

Change directory to your project and type the following command to open the Podfile.lock file.

$ open Podfile.lock -a Xcode
Siva
  • 1,481
  • 1
  • 18
  • 29
Ajay Gidwani
  • 121
  • 2
  • 5
2
pod search pod_name

example

pod search Alamofire

So you should have the pod name to use this command and it will give you a response like the following in the command line

-> Alamofire (4.7.3) Elegant HTTP Networking in Swift pod 'Alamofire', '~> 4.7.3' - Homepage: https://github.com/Alamofire/Alamofire - Source: https://github.com/Alamofire/Alamofire.git - Versions: 4.7.3, 4.7.2, 4.7.1, 4.7.0, 4.6.0, 4.5.1, 4.5.0, 4.4.0, 4.3.0, 4.2.0, 4.1.0, 4.0.1, 4.0.0, 3.5.1, 3.5.0, 3.4.2, 3.4.1, 3.4.0, 3.3.1, 3.3.0, 3.2.1, 3.2.0, 3.1.5, 3.1.4, 3.1.3, 3.1.2, 3.1.1, 3.1.0, 3.0.1, 3.0.0, 3.0.0-beta.3, 3.0.0-beta.2, 3.0.0-beta.1, 2.0.2, 2.0.1, 2.0.0, 2.0.0-beta.4, 2.0.0-beta.3, 2.0.0-beta.2, 2.0.0-beta.1, 1.3.1, 1.3.0, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.5, 1.1.4, 1.1.3 [master repo]

Daniel Raouf
  • 2,307
  • 1
  • 22
  • 28