edsnider - Xam.Plugin.LatestVersion 2.1.1-beta.107

Easily detect if you are running the latest version of your Xamarin or UWP app and open it in the App Store, Play Store or Microsoft Store to update it.

PM> Install-Package Xam.Plugin.LatestVersion -Version 2.1.1-beta.107 -Source https://www.myget.org/F/edsnider/api/v3/index.json

Copy to clipboard

> nuget.exe install Xam.Plugin.LatestVersion -Version 2.1.1-beta.107 -Source https://www.myget.org/F/edsnider/api/v3/index.json

Copy to clipboard

> dotnet add package Xam.Plugin.LatestVersion --version 2.1.1-beta.107 --source https://www.myget.org/F/edsnider/api/v3/index.json

Copy to clipboard
<PackageReference Include="Xam.Plugin.LatestVersion" Version="2.1.1-beta.107" />
Copy to clipboard
source https://www.myget.org/F/edsnider/api/v3/index.json

nuget Xam.Plugin.LatestVersion  ~> 2.1.1-beta.107
Copy to clipboard

> choco install Xam.Plugin.LatestVersion --version 2.1.1-beta.107 --source https://www.myget.org/F/edsnider/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "edsnider" -SourceLocation "https://www.myget.org/F/edsnider/api/v2"
Install-Module -Name "Xam.Plugin.LatestVersion" -RequiredVersion "2.1.1-beta.107" -Repository "edsnider" -AllowPreRelease
Copy to clipboard

LatestVersion Plugin for Xamarin and Windows apps

Build Status MyGet NuGet

Easily detect if you are running the latest version of your iOS, macOS, Android, or Windows app and open it in the App Store, Play Store, or Microsoft Store to update it.

Supported platforms and versions

Platform Supported Version
Xamarin.iOS Yes 7.0+
Xamarin.Android Yes 10.0+
Xamarin.Mac Yes 10.7+
Windows (UWP) Yes 10.0+
(Target 14393+)

API Usage

Check for latest version

Check if the current running app is the latest version available in the public store:

bool isLatest = await CrossLatestVersion.Current.IsUsingLatestVersion();

Get latest version number

Get the version number of the current running app's latest version available in the public store:

string latestVersionNumber = await CrossLatestVersion.Current.GetLatestVersionNumber();

Get installed version number

Get the version number of the current app's installed version:

string installedVersionNumber = CrossLatestVersion.Current.InstalledVersionNumber;

Open app in public store

Open the current running app in the public store:

await CrossLatestVersion.Current.OpenAppInStore();

Set country code

Set the country code to be used when looking up the current app in the public store:

CrossLatestVersion.Current.CountryCode = "nz";

Notes about the CountryCode property:

  • It is optional; if not provided it will default to "us".
  • It is only needed/used on iOS.
  • If used, the value should be an alpha-2 code (ISO 3166-1).

Example

using Plugin.LatestVersion;

var isLatest = await CrossLatestVersion.Current.IsUsingLatestVersion();

if (!isLatest)
{
    var update = await DisplayAlert("New Version", "There is a new version of this app available. Would you like to update now?", "Yes", "No");

    if (update)
    {
        await CrossLatestVersion.Current.OpenAppInStore();
    }
}

License

Licensed under MIT. See License file

  • .NETStandard 1.1
    • NETStandard.Library (>= 1.6.1)
  • MonoAndroid 7.1
    • HtmlAgilityPack (>= 1.11.43)
    • Jurassic (>= 3.2.6)
  • UAP 10.0.14393
  • Xamarin.iOS 1.0
  • Xamarin.Mac 2.0
  • .NETStandard 1.1: 1.1.0.0
  • MonoAndroid 7.1: 7.1.0.0
  • UAP 10.0.14393: 10.0.14393.0
  • Xamarin.iOS 1.0: 1.0.0.0
  • Xamarin.Mac 2.0: 2.0.0.0

Owners

edsnider

Authors

edsnider

Project URL

https://github.com/edsnider/LatestVersionPlugin

License

MIT

Tags

ios, android, macos, windows, xamarin.ios, xamarin.android, xamarin.mac, uwp, latestversion, apps, version, appstore, playstore, store, iphone, ipad, xamarin, xam.plugin, plugin

Info

20 total downloads
5 downloads for version 2.1.1-beta.107
Download (30.83 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
2.1.1-beta.107 30.83 KB Thu, 16 Jun 2022 15:03:00 GMT 5
2.1.1-beta.101 30.42 KB Thu, 15 Apr 2021 19:40:07 GMT 5
2.1.0-beta.96 30.43 KB Wed, 07 Apr 2021 12:16:57 GMT 1
2.1.0-beta.92 29.39 KB Wed, 07 Apr 2021 00:51:49 GMT 1
2.0.0-beta.90 29.36 KB Wed, 07 Apr 2021 00:10:47 GMT 1
2.0.0-beta.89 29.36 KB Tue, 06 Apr 2021 20:08:17 GMT 1
2.0.0-beta.76 28.83 KB Tue, 25 Feb 2020 13:48:47 GMT 3
1.1.3-beta.73 30.75 KB Sat, 23 Feb 2019 00:15:56 GMT 2
1.1.3-beta.72 30.75 KB Sat, 16 Feb 2019 03:37:08 GMT 1