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?
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.
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
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.
if You are finding the version of a particular pod installed, then follow below steps:
Open Xcode
Click on "Project Navigator"
Click on "Pods"
Open The Pod you wanna know the version of
Expand it
Expand the "Supporting Files" folder
Click On yourpodname.plist
Read the Bundle Version string, short
Open Terminal.
Change directory to your project and type the following command to open the Podfile.lock file.
$ open Podfile.lock -a Xcode
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]
Related
I'm trying to use Firebase In-App Messaging and just added some lines to my Podfile.
But when I run pod install, I got an error message below:
[!] CocoaPods could not find compatible versions for pod "Firebase/InAppMessagingDisplay":
In Podfile:
Firebase/InAppMessagingDisplay
Specs satisfying the `Firebase/InAppMessagingDisplay` dependency were found, but they required a higher minimum deployment target.
I also tried pod install --repo-update, but got the same error.
How can I install the pod?
My cocoapod is 1.5.3, and Xcode is 10.1.
Here's my Podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'
target 'iOSTestApp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for iOSTestApp
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/DynamicLinks'
pod 'Firebase'
pod 'Firebase/InAppMessagingDisplay'
target 'iOSTestAppTests' do
inherit! :search_paths
# Pods for testing
end
end
And the result of pod outdated:
- Firebase 4.4.0 -> (unused) (latest version 5.12.0)
- FirebaseAnalytics 4.0.4 -> 5.3.0 (latest version 5.3.0)
- FirebaseCore 4.0.9 -> 5.1.7 (latest version 5.1.7)
- FirebaseDynamicLinks 2.1.0 -> 3.1.1 (latest version 3.1.1)
- FirebaseInstanceID 2.0.5 -> 3.3.0 (latest version 3.3.0)
- FirebaseMessaging 2.0.5 -> 3.2.1 (latest version 3.2.1)
- GoogleToolboxForMac 2.1.3 -> (unused) (latest version 2.1.4)
- nanopb 0.3.8 -> 0.3.901 (latest version 0.3.901)
- Protobuf 3.4.0 -> 3.6.1 (latest version 3.6.1)
InAppMessaging requires Firebase 5.x. Do a pod update so that your existing pods will update past their currently install versions.
This is what I did.
pod 'Firebase'
pod 'Firebase/Core'
pod 'FirebaseMessaging' #, '~> 2.0.5'
pod 'Firebase/DynamicLinks'
pod 'Firebase/InAppMessagingDisplay'
Save podfile.
Quit xCode
Delete Pods folder and Podfile.lock
run pod install --verbose
if issue is resolved, thats good.
Else do following steps, it will update all your Pods
pod update
hope it helps.
Before you begin, you need a few things set up in your environment:
An app with Firebase enabled: If you haven't already, add Firebase to your iOS project.
Xcode 9.2 or higher: Firebase In-App Messaging needs a relatively-recent version of Xcode to run. You can find the latest Xcode version at Apple's Xcode site.
CocoaPods 1.4.0 or higher: Firebase In-App Messaging uses CocoaPods to manage dependencies on iOS. You can install it from the CocoaPods site.
One more thing to do, update Firebase SDK using pod update 'Firebase' and then after add Firebase/InAppMessagingDisplay dependency in a pod file.
It will start installing once execute pod install command in terminal.
I have executed "pod outdated" for my project. This is the output:
Analyzing dependencies
The following pod updates are available:
- Kingfisher 4.0.0 -> 4.0.0 (latest version 4.2.0)
- Lokalise 0.7.0 -> 0.7.0 (latest version 0.7.1)
- LokaliseLiveEdit 0.2.2 -> 0.2.2 (latest version 0.2.3)
- Realm 3.0.0 -> 3.0.0 (latest version 3.0.2)
- RealmSwift 3.0.0 -> 3.0.0 (latest version 3.0.2)
- SwiftLint 0.23.0 -> 0.23.0 (latest version 0.24.0)
- SwiftyJSON 3.1.4 -> 3.1.4 (latest version 4.0.0)
- Tabman 1.0.6 -> 1.0.6 (latest version 1.0.7)
What is the meaning of the version numbers which are presented three times per line?
In general, this is the scheme of a line of pod outdated's output:
- <pod name> <current version> -> <latest version (with restrictions)> (latest version <latest version (without restrictions)>)
The first version number (before the arrow) is the current version of a Pod.
The second number (after the arrow) is the latest available version according to the restrictions in your Podfile.
The third version number (inside the brackets, after "latest version") is the latest available version without the personal restrictions.
From CocoaPods Guides:
When you run pod outdated, CocoaPods will list all pods which have newer versions than the ones listed in the Podfile.lock (the versions currently installed for each pod). This means that if you run pod update PODNAME on those pods, they will be updated — as long as the new version still matches the restrictions like pod 'MyPod', '~>x.y' set in your Podfile.
I am a newbie in cocoapods and I would be appreciated if you help.
Today I want to use cocoapods to manager my dependencies in my project.
So my Profile is:
platform :ios, '8.0'
target 'TargetName' do
pod 'AFNetworking', '~> 3.0'
end
But after running pod install, I got the message as follow:
pod install
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (3.1.0)
Generating Pods project
[1] 53417 abort pod install
After that, I can't find the TargetName.xcworkspace and the Podfile.lock but the Pods folder is there.
That's weird because there are no more error messages here.
I installed the cocoapods exactly according to the official guides. And here are the environments:
pod: 1.1.1
ruby: 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
gem: 2.6.8
Xcode: 8.2.1
Thank you very much!
Finally I upgrade cocoapods(now Version 1.2.0.beta.1) and solve my problem.
I haved installed cocoapods On EI. But I cannot use "pod search"
DolphindeMacBook-Pro:~ dolphin$ pod --version
1.0.0
DolphindeMacBook-Pro:~ dolphin$ pod search afnetworking
Creating search index for spec repo 'master'.. Done![!] Unable to find a pod with name, author, summary, or descriptionmatching `afnetworking`
how to fix it
Open terminal and run rm ~/Library/Caches/CocoaPods/search_index.json
pod search AFNetworking
Use sudo rm ~/Library/Caches/CocoaPods/search_index.json in case above command ask for permission
Should be is creating search index, I also is same, you can wait patiently, as follows:
$ pod search AFNetworking
Creating search index for spec repo 'master'.. Done!
Creating search index for spec repo 'master-1'.. Done!
-> AFNetworking (3.1.0)
A delightful iOS and OS X networking framework.
pod 'AFNetworking', '~> 3.1.0'
- Homepage: https://github.com/AFNetworking/AFNetworking
- Source: https://github.com/AFNetworking/AFNetworking.git
- Versions: 3.1.0, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 3.0.0-beta.3,
3.0.0-beta.2, 3.0.0-beta.1, 2.6.3, 2.6.2, 2.6.1, 2.6.0, 2.5.4, 2.5.3, 2.5.2,
2.5.1, 2.5.0, 2.4.1, 2.4.0, 2.3.1, 2.3.0, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0,
2.1.0, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 2.0.0-RC3, 2.0.0-RC2, 2.0.0-RC1, 1.3.4,
1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.2.1, 1.2.0, 1.1.0, 1.0.1, 1.0, 1.0RC3, 1.0RC2,
1.0RC1, 0.10.1, 0.10.0, 0.9.2, 0.9.1, 0.9.0, 0.7.0, 0.5.1 [master repo]
- Subspecs:
- AFNetworking/Serialization (3.1.0)
- AFNetworking/Security (3.1.0)
- AFNetworking/Reachability (3.1.0)
- AFNetworking/NSURLSession (3.1.0)
- AFNetworking/UIKit (3.1.0)
$ pod --version
1.0.1
With cocoapods installed, take the following steps:
Open a terminal window, and $ cd into your project directory (cd ~/Path/To/Folder/Containing/your/app)
Create a Podfile by running $ pod init
Open the podfile (open -a Xcode Podfile) and add the podline and save the file, for example:
pod 'AFNetworking', '~> 3.0'
Run $ pod install in your project directory
Open App.xcworkspace
Please find a more extended guide here
Hope this helps!
I had some problems with one version of the project. I've found this answer where someone suggest steps to remove all cocoapods-connected stuff from the machine and reinstall it. I did follow the steps:
$ 'pod --version'
0.36.1
$ gem list --local | grep cocoapods
cocoapods (0.39.0.rc.1, 0.38.2, 0.38.1, 0.37.2)
cocoapods-core (0.39.0.rc.1, 0.38.2, 0.38.1, 0.37.2)
cocoapods-downloader (0.9.3, 0.9.1)
cocoapods-plugins (0.4.2)
cocoapods-search (0.1.0)
cocoapods-stats (0.6.2, 0.5.3)
cocoapods-trunk (0.6.4, 0.6.1)
cocoapods-try (0.5.1, 0.4.5)
$ gem uninstall cocoapods // and all others from the list above
The problem is that when i again grep all cocoapods, the list was equal to upper one, nothing disappeared.
$ sudo gem uninstall cocoapods
Select gem to uninstall:
1. cocoapods-0.37.2
2. cocoapods-0.38.1
3. cocoapods-0.38.2
4. cocoapods-0.39.0.rc.1
5. All versions
> 5
$ pod --version
// here was the error command not found, so everything fine
$ sudo gem install cocoapods
Fetching: cocoapods-0.38.2.gem (100%)
Successfully installed cocoapods-0.38.2
Parsing documentation for cocoapods-0.38.2
Installing ri documentation for cocoapods-0.38.2
Done installing documentation for cocoapods after 2 seconds
1 gem installed
$ pod --version
Could not find proper version of cocoapods (0.36.1) in any of the sources
Run `bundle install` to install missing gems.
But why does it want me to install 0.36.1? Anyway, as it asked, I did:
$bundle install
Installing cocoapods-core 0.36.1
Installing cocoapods-downloader 0.8.1
Installing cocoapods-plugins 0.4.1
Installing cocoapods-trunk 0.6.0
Installing cocoapods-try 0.4.3
Installing cocoapods 0.36.1
// Many "using" dependencies
So now when I run:
$ pod --version
0.36.1
And I'm stuck :) Why can't I have newest release version? Maybe pod --version points to the newest version of cocoapods-core instead of only cocoapods, so everything is ok and I have the correct version?
Check if you use Gemfile and there is specified the version of
cocoapods.
You can use specific version by pod *version* action. For example: pod _1.5.0.beta.1_ update or pod _1.5.0.beta.1_ install
For anyone coming to this in an attempt to update cocoapods. After doing all of the above I wasn't able to get this resolved. I then headed to the resolved answer and being unwilling to remove RVM, I tried to resolve this issue another way.
I found that my issue did indeed lie in my Gemfile.
First, run
gem install cocoapods to ensure you have the latest version, or whatever specified version you were looking for downloaded.
Second, ensure your projects Gemfile hasn't specified a cocoapods version number and instead simply specifies it as:
gem "cocoapods"
If yours doesn't, change this and run bundle update to regenerate the Gemfile.lock file and your problem should be solved. If not, go ahead and delete the Gemfile.lock file altogether and then run bundle update. You can easily check to see which gem version will be loaded by opening the Gemfile.lock file and searching for cocoapods-core <version number here>
At this point, you can go into your project and run
pod setup
and then check the cocoapods version with
pod --version
and now FINALLY you are free to run
pod install
to replace the Podfile.lock file and get back to your happy dev life. Hope that helps someone and saves them from burning hours.
It seems something got messed up in my ruby version. I still have no idea what and why. I've managed to fix it via this solution: https://stackoverflow.com/a/25021772/849616. After it everything works correctly.
You might face this issue when it comes migrating to a higher Swift version. Assuming that you already have cocoapods installed, you probably need to run bundle update command (possibly with sudo).
For more details, you could check: https://guides.cocoapods.org/using/a-gemfile.html
Additionally, I'd suggest to do the following:
Install the latest Xcode version.
Clear derived data (not just clean project) in your project.
Run pod update command.
I have the same problem.
In my project, pod --version and gem which cocoapods always return diffrence version.
All I had to do is remove Gemfile.lock in my project and bundle install again. It removed the locked cocoapods version and install a new one.
Hope that helps some one here.
I ran pod install and I've got this error:
Could not find proper version of cocoapods (1.11.3) in any of the sources
and I ran:
bundle install
after that pod install worked properly