How to check version of a CocoaPods framework

大城市里の小女人 提交于 2019-11-26 23:55:19

问题


I have updated Flurry via CocoaPods, but how can I check if Flurry was updated?

I mean the terminal shown me that everything is ok:

Installing FlurrySDK (4.2.3)
Generating Pods project
Integrating client project

but I am not sure that it has been updated.


回答1:


The Podfile.lock keeps track of the resolved versions of each Pod installed. If you want to double check that FlurrySDK is using 4.2.3, check that file.

Note: You should not edit this file. It is auto-generated when you run pod install or pod update




回答2:


pod outdated

When you run pod outdated, CocoaPods will list all pods that have newer versions that the ones listed in the Podfile.lock (the versions currently installed for each pod) and that could be updated (as long as it matches the restrictions like pod 'MyPod', '~>x.y' set in your Podfile)




回答3:


To check version of cocoapods from terminal:

For Sudoless:

gem which cocoapods

For Sudo:

sudo gem which cocoapods

Also note: If you want to edit podfile or podfile.lock don't edit it in editors. Open only with XCode.




回答4:


pod --version

to get the version of installed pod




回答5:


You can figure out version of Cocoapods by using below command :

pod —-version

o/p : 1.2.1

Now if you want detailed version of Gems and Cocoapods then use below command :

gem which cococpods (without sudo)

o/p : /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods.rb

sudo gem which cocoapods (with sudo)

o/p : /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods.rb

Now if you want to get specific version of Pod present in Podfile then simply use command pod install in terminal. This will show list of pod being used in project along with version.




回答6:


I wrote a small commandline tool that parses the Podfile.lock and shows which version of each Pod is currently installed. It will also check for the latest version online and give you a summary of dependencies which are out-of-date.

You can find it on Github: https://github.com/citruz/podchecker




回答7:


The highest voted answer (MishieMoo) is correct but it doesn't explain how to open Podfile.lock. Everytime I tried I kept getting:

You open it in terminal by going to the folder it's in and running:

vim Podfile.lock

I got the answer from here: how to open Podfile.lock

You close it by pressing the colon and typing quit then enter

:quit //then return key



回答8:


Podfile.lock file right under Podfile within your project.

The main thing is , Force it to open through your favourite TextEditor, like Sublime or TextEdit [Open With -> Select Sublime] as it doesn't give an option straight away to open.




回答9:


pod --version used this to check the version of the last installed pod



来源:https://stackoverflow.com/questions/18931091/how-to-check-version-of-a-cocoapods-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!