Oscore.Maui.AppStoreInfo 1.1.0

Prefix Reserved
dotnet add package Oscore.Maui.AppStoreInfo --version 1.1.0                
NuGet\Install-Package Oscore.Maui.AppStoreInfo -Version 1.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Oscore.Maui.AppStoreInfo" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Oscore.Maui.AppStoreInfo --version 1.1.0                
#r "nuget: Oscore.Maui.AppStoreInfo, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Oscore.Maui.AppStoreInfo as a Cake Addin
#addin nuget:?package=Oscore.Maui.AppStoreInfo&version=1.1.0

// Install Oscore.Maui.AppStoreInfo as a Cake Tool
#tool nuget:?package=Oscore.Maui.AppStoreInfo&version=1.1.0                

Maui.AppStoreInfo

Nuget package CI/CD License: MIT

Allows you to check the information in App stores(for example the latest published version) and suggest actions to the user based on this.

Supported Platforms

Platform Minimum Version Supported
iOS 12.2+
macOS 15+
Android 5.0 (API 21)
Windows 11 and 10 version 1809+ (build 17763)

[!NOTE]
Since Android doesn't provide an official API, there is no support for this other than opening a store page. It is recommended to use Android In-App Updates if you need to check for updates.

Usage

  • Add NuGet package to your project:
<PackageReference Include="Oscore.Maui.AppStoreInfo" Version="1.1.0" />
  • Add the following to your MauiProgram.cs CreateMauiApp method:
builder
    .UseMauiApp<App>()
+   .UseAppStoreInfo(options =>
+   {
+       options.CountryCode = "gb"; // Optional, default is "us"
+       options.PackageName = "com.companyname.appname"; // Optional, default is AppInfo.Current.PackageName
+       options.CurrentVersion = new Version(1, 0, 0); // Optional, default is AppInfo.Current.Version
+   })
    .ConfigureFonts(fonts =>
    {
        fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
        fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
    });
  • Use the AppStoreInfo.Current class or IAppStoreInfo from DI to check the latest version and suggest actions to the user:
if (!await AppStoreInfo.Current.IsUsingLatestVersionAsync())
{
    await AppStoreInfo.Current.OpenApplicationInStoreAsync();
}

// This is all based on the information provided by the following method
var information = await AppStoreInfo.Current.GetInformationAsync();
            
await DisplayAlert(
    "App Store Information",
    $"Title: {information.Title}\n" +
    $"Description: {information.Description}\n" +
    $"Latest Version: {information.LatestVersion}\n" +
    $"External Store Uri: {information.ExternalStoreUri}\n" +
    $"Internal Store Uri: {information.InternalStoreUri}\n" +
    $"Release Notes: {information.ReleaseNotes}\n" +
    $"Application Size: {information.ApplicationSizeInBytes/1024/1024} MB\n",
    "OK");
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android35.0 is compatible.  net9.0-ios18.0 is compatible.  net9.0-maccatalyst18.0 is compatible.  net9.0-tizen8.0 is compatible.  net9.0-windows10.0.19041 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 128 12/3/2024
1.0.7 5,100 3/28/2024
1.0.6 206 3/20/2024
1.0.4 849 2/23/2024
1.0.3 139 2/22/2024
1.0.2 140 2/21/2024
1.0.1 136 2/21/2024
1.0.0 158 2/19/2024
0.9.0 133 2/19/2024
0.0.0-dev 82 12/5/2024