Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tbaranes/VersionTrackerSwift
Versions tracker for your iOS, macOS, and tvOS app
https://github.com/tbaranes/VersionTrackerSwift
Last synced: about 2 months ago
JSON representation
Versions tracker for your iOS, macOS, and tvOS app
- Host: GitHub
- URL: https://github.com/tbaranes/VersionTrackerSwift
- Owner: tbaranes
- License: mit
- Created: 2016-02-18T20:48:06.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-04-30T06:54:38.000Z (9 months ago)
- Last Synced: 2024-12-07T23:41:46.485Z (about 2 months ago)
- Language: Swift
- Homepage:
- Size: 169 KB
- Stars: 88
- Watchers: 1
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - VersionTrackerSwift - Track which versions of your app a user has previously installed.. (Utility / Web View)
- awesome-swift - Version Tracker Swift - Versions tracker for your iOS, OS X, and tvOS app. (Libs / Version Manager)
- awesome-swift - Version Tracker Swift - Versions tracker for your iOS, OS X, and tvOS app. (Libs / Version Manager)
- awesome-ios-star - VersionTrackerSwift - Track which versions of your app a user has previously installed.. (Utility / Web View)
- awesome-macOS - VersionTrackerSwift - Track which versions of your app a user has previously installed. 🔶 (Uncategorized / Uncategorized)
- fucking-awesome-swift - Version Tracker Swift - Versions tracker for your iOS, OS X, and tvOS app. (Libs / Version Manager)
- awesome-swift-cn - VersionTrackerSwift - Track which versions of your app a user has previously installed. Available for iOS, OS X and tvOS. (Libs / Utility)
- awesome-swift - Version Tracker Swift - Versions tracker for your iOS, macOS, and tvOS app ` 📝 8 months ago ` (Version Manager [🔝](#readme))
README
# VersionTrackerSwift
![Language](https://img.shields.io/badge/language-Swift%205.10-orange.svg)
[![Platform](https://img.shields.io/cocoapods/p/VersionTrackerSwift.svg?style=flat)](http://cocoadocs.org/docsets/VersionTrackerSwift)VersionTrackerSwift is a versions / builds tracker to know which version has been installed by a user.
![](./assets/demo.png)
## Usage
In your ApplicationDelegate, call the method `track` to track the current version:
```swift
// iOS / tvOS
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
VersionTracker.track()
return true
}
``````swift
// macOS
func applicationDidFinishLaunching(aNotification: NSNotification) {
VersionTracker.track()
return true
}
```Then, call whenever one of the following methods to get the data you need:
```swift
VersionTracker.shared.track()
VersionTracker.shared.isFirstLaunchEver // Bool
VersionTracker.shared.isFirstVersionLaunch // Bool
VersionTracker.shared.isFirstBuildLaunch // Bool
VersionTracker.shared.versionHistory // [String]
VersionTracker.shared.buildHistory // [String]VersionTracker.currentVersion // String
VersionTracker.currentBuild // String
```Check out the examples and play with the version / build / number to have a concrete example.
### How it works?
Each time you call the method `track`, the version and build are stored in `NSUserDefaults` if a new version / build is detected. Then, you can access to any information from the tracker.
The version and build number are the information you specify in your app's Info.plist.
### Manual
Just drag the `Source/*.swift` files into your project.
## Contribution- If you found a **bug**, open an **issue**
- If you have a **feature request**, open an **issue**
- If you want to **contribute**, submit a **pull request**## Licence
VersionTrackerSwift is available under the MIT license. See the LICENSE file for more info.