How to check podfile version added to Xcode project?

3k views Asked by At

I am using RestKit, it uses different podfiles.I want to know which is the podfile version used in that sample app.And also want to know how to update podfile via terminal?

2

There are 2 answers

1
MGY On

Answer of Question 1

you can learn this in project's podspec file. For your case it's RestKit's podspec :

Pod::Spec.new do |s|
  s.name             =  'RestKit'
  s.version          =  '0.24.1'
  s.summary          =  'RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X.'
  s.homepage         =  'https://github.com/RestKit/RestKit'
  s.social_media_url =  'https://twitter.com/RestKit'
  s.author           =  { 'Blake Watters' => '[email protected]' }
  s.source           =  { :git => 'https://github.com/RestKit/RestKit.git', :tag => "v#{s.version}" }
  s.license          =  'Apache License, Version 2.0'

... ... ...

When you use in your Podfile like this :

pod 'RestKit'

it'll automatically get latest released version!. For your case it's this line in project's podspec file :

  s.version          =  '0.24.1'

but if you want to decide which version you want to installed with this line :

pod 'RestKit', '~> 0.24.0'

Answer to Question 2

you can update pods with this command :

pod update

Hope everything is clear now.

0
Sreedeepkesav M S On

Question 1:

If the pod is installed, Go to the info.plist file of the pod and there you can see the version of the installed pod.

Question 2: To update podfile via terminal, open podfile using

vi podfile

Click "i" and then you can edit or insert an item in podfile. To save the changes, Use

click esc then :wq!

Run pod update to update the changes.