InAppUpdates.iOSAndroid.Maui 0.0.6

dotnet add package InAppUpdates.iOSAndroid.Maui --version 0.0.6
                    
NuGet\Install-Package InAppUpdates.iOSAndroid.Maui -Version 0.0.6
                    
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="InAppUpdates.iOSAndroid.Maui" Version="0.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="InAppUpdates.iOSAndroid.Maui" Version="0.0.6" />
                    
Directory.Packages.props
<PackageReference Include="InAppUpdates.iOSAndroid.Maui" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add InAppUpdates.iOSAndroid.Maui --version 0.0.6
                    
#r "nuget: InAppUpdates.iOSAndroid.Maui, 0.0.6"
                    
#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.
#:package InAppUpdates.iOSAndroid.Maui@0.0.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=InAppUpdates.iOSAndroid.Maui&version=0.0.6
                    
Install as a Cake Addin
#tool nuget:?package=InAppUpdates.iOSAndroid.Maui&version=0.0.6
                    
Install as a Cake Tool

Usage

  • Add NuGet package to your project:
    <PackageReference Include="InAppUpdates.iOSAndroid.Maui" Version="0.0.6" />
  • Add the following to your MauiProgram.cs CreateMauiApp method:
  builder
	.UseMauiApp<App>()
+	.UseInAppUpdates(static options =>
	{
		options.AppUpdateCheckIntervalDays = 0; // Check for updates every time the app starts
        options.AppUpdatePreferenceFileName = "AppStoreVersionPreference";
#if IOS
        options.AppBundleID = "6741144561";
		options.AppPackageName = "com.company.example";
		options.AppCountryCode = "au";
		options.AppUpdateAlertTitle = "Update Available";
		options.AppUpdateAlertMessage = "A new version {0} of the app is available. " +
										"Please update to continue using the app.";
		options.AppUpdateAlertButtonYesTxt = "Update Now";
		options.AppUpdateAlertButtonNoTxt = "Later";

		options.AppUpdateDelayAfterSplashInSeconds = 0.5;
#endif

#if ANDROID
		options.ImmediateUpdatePriority = 2;
#endif
#if DEBUG
#if ANDROID
		options.UseFakeAppUpdateManager = true;
#endif

        options.DebugAction = (applog) =>
        {
            Console.WriteLine("Debug action executed: " + applog);
        };
#endif

    })
	.ConfigureFonts(fonts =>
	{
		fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
		fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
	});

iOS

Notes

  • Properties mentioned in the iOS Macro are required for iOS
  • By using the bundle ID, the app will be able to check for updates in the App Store.
  • Package name used to redirect iOS Store, when update is available.

Android

Notes

The default behavior:

  • If priority 1-3 is specified, flexible update will be offered
  • If priority 4-5 is specified, immediate update will be offered

There is no need to specify conditional compilation here, the package provides an empty method for non netx.0-android platforms as a stub to make integration as simple as possible.
It will display a window when starting an application or resume according to the official guides.
You cannot see the popup dialog while developing or if you distribute it manually. As you can see here, you have to download the app from the Play Store to see the popup. I recommend using Android Play Store's “Internal App Sharing” feature to test.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-android35.0 is compatible.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-ios18.0 is compatible.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
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.