I'm having some problem with my installed pods. They are not pulling the most recent (bug-fixed) version of their libraries from Github, and hence my Xcode compiler is full of warnings. I don't understand how Cocoapods works an entirely, and I'm wondering if anyone can clear it up.
How does Cocoapods know when a new version of a library is available?
What is required for Cocoapods to retreive the latest version via the
sudo pod install
comand?
Cocoapods are usually linked to a specific repository tag and version, so looking at AQGridView we can see two versions, version 1.2 refers specifically to the commit commit => 'f6c5589a6dabfff693fc7def7342327b9b0df3f9
whilst 1.3 differs. If the first time you ran a pod install
1.2 was the last version you would always get version 1.2 so as to not break backwards compatibility.
If you wanted to update to version you could run pod update
which would check your existing podspec file and look for the latest versions ( on cocoapods! ) and use those.
If you wanted to use cocoapods but access the latest version specifically for one there is a wiki page saying how to do it here
So with that down,
When someone updates the Specs repo the pods on your computer doesn't know this instantly, you can run pod repo update
to ensure you're at the latest. I expect it auto checks every so often.
Mentioned above, if you run pod update
it will use the latest podspec versions
Podspecs are updated as often as people want their libraries to have a version number, ideally whenever you release a point release you should also submit a corrosponding podspec to the repo and then everyone knows they can update. It is quite often updated by volunteers, but we do get authors updating their own libraries.
pod install
does not install the newest versions! Using the newest version by default is a bad idea. You should always specify the exact versions or use the pessimistic version constraint (~>
).
To get notified about new versions you can use VersionEye. You can directly follow pods to receive email notifications as soon updates are available. In additional to that it can directly monitor your GitHub repository and notify you about out-dated pods in your project. That is the most convenient way. You can read more here.
if you get the notification for a new version you should first check the version number. If the pod project is using http://semver.org/ you can already on the version number see if you can update without breaking your build. In the worst case it's a major release, which very likely will break your build. In that case you have to check the change logs and the migration path. If you wanna learn about how to update right, check out the slides to continuous updating.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With