Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/colbylwilliams/VersionTrackingPlugin
Version Tracking Plugin for Xamarin and Windows
https://github.com/colbylwilliams/VersionTrackingPlugin
android ios nuget versioning windows xamarin xamarin-android xamarin-forms xamarin-ios xamarin-plugin
Last synced: 30 days ago
JSON representation
Version Tracking Plugin for Xamarin and Windows
- Host: GitHub
- URL: https://github.com/colbylwilliams/VersionTrackingPlugin
- Owner: colbylwilliams
- License: mit
- Created: 2016-02-19T22:02:03.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-03T19:11:44.000Z (about 7 years ago)
- Last Synced: 2024-11-12T02:46:58.413Z (about 1 month ago)
- Topics: android, ios, nuget, versioning, windows, xamarin, xamarin-android, xamarin-forms, xamarin-ios, xamarin-plugin
- Language: C#
- Homepage:
- Size: 461 KB
- Stars: 62
- Watchers: 8
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-xamarin-forms - Version Tracking ★62
README
## Version Tracking Plugin for Xamarin and Windows ![NuGet](https://img.shields.io/nuget/v/Plugin.VersionTracking.svg?label=NuGet)
Track which versions of your Xamarin.iOS, Xamarin.Mac, Xamarin.Android, or Windows app a user has previously installed.
## Setup
* Available on NuGet: https://www.nuget.org/packages/Plugin.VersionTracking/
* Install into your PCL/.NET Standard project and Client projects.
_(fuctionality is exposed through a built-in Singleton, no dependency service required)_##### Platform Support
|Platform|Version|
| ------------------- | :------------------: |
|Xamarin.iOS|iOS 7+|
|Xamarin.Android|API 10+|
|Windows 10 UWP|10+|
|Xamarin.Mac|All|**_Supports both classic Xamarin.iOS / Xamarin.Android and Xamarin.Forms_**
## API Usage
Call this on each app launch inside `DidFinishLaunching` (Xamarin.iOS), `FinishedLaunching` (Xamarin.Mac), or the MainActivity's `OnCreate` (Xamarin.Android)
```C#
CrossVersionTracking.Current.Track ();
```Then call these whenever you want (in these examples the user has launched a bunch of previous versions, and this is the first time he's launched the new version 1.0.11):
```C#
var vt = CrossVersionTracking.Current;vt.IsFirstLaunchEver; // false
vt.IsFirstLaunchForVersion; // true
vt.IsFirstLaunchForBuild; // truevt.CurrentVersion; // 1.0.11
vt.PreviousVersion; // 1.0.10
vt.FirstInstalledVersion; // 1.0.0
vt.VersionHistory; // [ 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.10, 1.0.11 ]vt.CurrentBuild; // 18
vt.PreviousBuild; // 15
vt.FirstInstalledBuild; // 1
vt.BuildHistory; // [ 1, 2, 3, 4, 5, 8, 9, 10, 11, 13, 15, 18 ]
```Or set up actions to be called on the first lauch of a specific version or build:
```C#
var vt = CrossVersionTracking.Current;vt.OnFirstLaunchOfBuild ("18", () => Console.WriteLine ("First time Build 18 launched!"));
vt.OnFirstLaunchOfVersion ("1.0.11", () => Console.WriteLine ("First time Version 1.0.11 launched!"));
```## Contributors
* [Colby Williams](https://github.com/colbylwilliams)
* _Originally inspired by [GBVersionTracking](https://github.com/lmirosevic/GBVersionTracking)_#### License
The MIT License (MIT)
Copyright © 2017 Colby Williams