CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✓ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Apr 2016 |
| SPMSupports SPM | ✗ |
Maintained by Christoffer Winterkvist.
Helping you find inner peace when comparing version numbers in Swift.
Comparing with the current applications version couldn’t be easier.
// App.version is 1.0.0
if App.version.olderThan("2.0.0") {
// Prompt user to update
}But you can apply this to more things than just the CFBundleShortVersionString.
let currentVersion = "1.0.1a"
if currentVersion.olderThan("1.1.3") {
// update
}Versions also support semantic versioning (Major, Minor, Patch)
if "1.0".semanticCompare("2.0") == Semantic.Major) {
// major update
}
Verisons is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Versions"git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)