Oscore.Maui.InAppReviews 1.0.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package Oscore.Maui.InAppReviews --version 1.0.0
NuGet\Install-Package Oscore.Maui.InAppReviews -Version 1.0.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.InAppReviews" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Oscore.Maui.InAppReviews --version 1.0.0
#r "nuget: Oscore.Maui.InAppReviews, 1.0.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.InAppReviews as a Cake Addin
#addin nuget:?package=Oscore.Maui.InAppReviews&version=1.0.0

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

Maui.InAppReviews

Nuget package CI/CD License: MIT

NuGet package that implementing native In-App Reviews for MAUI with debugging capabilities. InAppReviews

In-app reviews supported on Android 5.0 (API level 21) & iOS 10.3+ & Windows devices.
It can return ReviewStatus.NotSupported, in this case you can use AppStoreInfo to open review page in the store.

Usage

  • Add NuGet package to your project:
<PackageReference Include="Oscore.Maui.InAppReviews" Version="1.0.0" />
  • Add the following to your MauiProgram.cs CreateMauiApp method:
builder
    .UseMauiApp<App>()
+   .UseInAppReviews()
    .ConfigureFonts(fonts =>
    {
        fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
        fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
    });
ReviewStatus status = await InAppReview.Current.RequestAsync();

Android code shrinker (Proguard & r8)

If you use the plugin with Link SDK assemblies only/Link all, you have to do the following:

  1. Create a proguard.txt file in your android project and add the following:
    -keep class com.google.android.play.core.common.PlayCoreDialogWrapperActivity
    -keep class com.google.android.play.core.review.** { *; }
    -keep class com.google.android.play.core.tasks.** { *; }
  1. Include it to your project
  2. Properties > Build Action > ProguardConfiguration
  3. Go to you Android project options and set your Code Shrinker to ProGuard or r8

Testing & Debugging issues

iOS
  • You cannot submit a review on iOS while developing, but the review popup dialog displays in your simulator/device.
  • However, when you download the app from Testflight, the popup dialog does not display at all, as mentioned here:

When you call this method while your app is still in development mode, a rating/review request view is always displayed so that you can test the user interface and experience. However, this method has no effect when you call it in an app that you distribute using TestFlight."

Android
  • Unlike iOS, you cannot see the review 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.
  • Occasionally, some devices may not show the popup at all as seen here. One way to test whether your device is affected by it, is by downloading this game that uses v3.1 of this nuget, target SDK version 30, target framework v11.0 and win the game once to see the popup. Additionally, you can debug the error using adb locat, as you can see here
  • The most common issue/crash type is that developers release the app in the release configuration but they only test in the debug configuration. They do not realize that they have set Linker behavior to Link SDK assemblies only/Link all, and did not follow the proguard steps mentioned above
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-android34.0 is compatible.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-ios17.2 is compatible.  net8.0-maccatalyst was computed.  net8.0-maccatalyst17.2 is compatible.  net8.0-macos was computed.  net8.0-tizen8.0 is compatible.  net8.0-tvos was computed.  net8.0-windows was computed.  net8.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.0.0 587 3/11/2024