VersionsTracker alternatives and similar libraries
Based on the "Utility" category.
Alternatively, view VersionsTracker alternatives based on common mentions on social networks and blogs.
-
SwifterSwift
A handy collection of more than 500 native Swift extensions to boost your productivity. -
SwiftGen
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs! -
SwiftGen-Storyboard
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs! -
SwiftLinkPreview
It makes a preview from an URL, grabbing all the information such as title, relevant texts and images. -
Playbook
📘A library for isolated developing UI components and automatically taking snapshots of them. -
BetterSafariView
A better way to present a SFSafariViewController or start a ASWebAuthenticationSession in SwiftUI. -
SwiftPlantUML
A command-line tool and Swift Package for generating class diagrams powered by PlantUML -
Pythonic.swift
DISCONTINUED. Pythonic tool-belt for Swift – a Swift implementation of selected parts of Python standard library.
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of VersionsTracker or a related project?
README
VersionsTracker
Keeping track of version installation history made easy.
Features
- Track not just marketing version, but also build number and install date
- Track both App and OS version
- Access current version
- Check for version updates and first launch
- No use as Singleton required
- Ability to use custom NSUserDefaults (e.g. for sharing it with extensions )
Example
To run the example project, clone the repo, and run pod install
from the Example directory first. Play with the Sample app's version and build numbers.
Requirements
- Xcode 7.0+
- iOS 8.0+
- Semantic Versioning
Installation
CocoaPods
VersionsTracker is available through CocoaPods. To install
it, simply add the following line to your Podfile
:
pod "VersionsTracker"
Carthage
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. Add the following line to your Cartfile
:
github "martnst/VersionsTracker"
Usage
Initialization
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
if iDontMindSingletons {
VersionsTracker.initialize(trackAppVersion: true, trackOSVersion: true)
}
else {
// make sure to update the version history once once during you app's life time
VersionsTracker.updateVersionHistories(trackAppVersion: true, trackOSVersion: true)
}
return true
}
Get the current versions with build and install date
let versionsTracker = iDontMindSingletons ? VersionsTracker.sharedInstance : VersionsTracker()
let curAppVersion : Version = versionsTracker.appVersion.currentVersion
print("Current marketing version is \(curAppVersion.versionString) (Build \(curAppVersion.buildString)) and was first launched \(curAppVersion.installDate)")
Get the version history
let versionsTracker = iDontMindSingletons ? VersionsTracker.sharedInstance : VersionsTracker()
let appVersions: [Version] = versionsTracker.appVersion.versionHistory
let firstOSVerion : Version = versionsTracker.osVersion.versionHistory.first!
print("The very first time the app was launched on iOS \(firstOSVerion.versionString) on \(firstOSVerion.installDate)")
Check version changes easily
let versionsTracker = iDontMindSingletons ? VersionsTracker.sharedInstance : VersionsTracker()
switch versionsTracker.appVersion.changeState {
case .installed:
// 🎉 Sweet, a new user just installed your app
// ... start tutorial / intro
print("🆕 Congratulations, the app is launched for the very first time")
case .notChanged:
// 😴 nothing as changed
// ... nothing to do
print("🔄 Welcome back, nothing as changed since the last time")
case .updated(let previousVersion: Version):
// 🙃 new build of the same version
// ... hopefully it fixed those bugs the QA guy reported
print("🆙 The app was updated making small changes: \(previousVersion) -> \(versionTracker.currentVersion)")
case .upgraded(let previousVersion):
// 😄 marketing version increased
// ... migrate old app data
print("⬆️ Cool, its a new version: \(previousVersion) -> \(versionTracker.currentVersion)")
case .downgraded(let previousVersion):
// 😵 marketing version decreased (hopefully we are not on production)
// ... purge app data and start over
print("⬇️ Oohu, looks like something is wrong with the current version to make you come back here: \(previousVersion) -> \(versionTracker.currentVersion)")
}
Since the build is also kept track off, it enables detecting updates of it as well. However, the build fraction of a version is treated as an arbitrary string. This is to support any build number, from integer counts to git commit hashes. Therefor there is no way to determine the direction of a build change.
Compare Version
let versionsTracker = iDontMindSingletons ? VersionsTracker.sharedInstance : VersionsTracker()
let curAppVersion : Version = versionsTracker.appVersion.currentVersion
curAppVersion >= Version("1.2.3")
curAppVersion >= "1.2.3"
Version("1.2.3") < Version("3.2.1")
curAppVersion != Version("1.2.3", buildString: "B19")
Versions with the same marketing version but different build are not equal.
Author
Martin Stemmle, [email protected]
License
VersionsTracker is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the VersionsTracker README section above
are relevant to that project's source code only.