跨 Xamarin 和 Windows 应用程序请求应用商店评论
Platform Support
| Platform | Version |
|---|---|
| Xamarin.iOS | iOS 7+ |
| Xamarin.tvOS | All |
| Xamarin.Android | API 10+ |
| UWP | API 10+ |
| .NET 6+ | iOS/Android/Mac/Windows/MAUI |
| macOS | All |
This will open the related app store for your app identifier. iOS: This is found on your iTunes connect page for your app Android: This is your package Id from your Android Manifest. UWP: This is the Store ID: You can find the link to your app's Store listing on the App identity page, in the App management section of each app in your dashboard.
///
/// Opens the store listing.
///
/// App identifier.
void OpenStoreListing(string appId);Launches app directly to Review Page if possible
///
/// Opens the store review page.
///
/// App identifier.
void OpenStoreReviewPage(string appId);UWP (all versions), Android and iOS only to prompt for the user to review the app. Only on Android 5.0 (API level 21) & iOS 10.3+ devices:
Read for iOS: Requesting Reviews with iOS 10.3’s SKStoreReviewController
Read for Android: In-app reviews for your Android apps
///
/// Requests the review.
///
Task RequestReview(bool testMode)If you are on .NET 6 Windows you will need to set the Window handle before calling the method:
#if WINDOWS
var windowObject = (MauiWinUIWindow)App.Current.Windows[0].Handler.PlatformView;
StoreReviewImplementation.Window = windowObject;
#endifTest mode is only used on Android.
Ensure that you follow the Xamarin.Essentials setup steps. And follow the steps below if you linker behavior is not set to Don't Link.
If you use the plugin with Link SDK assemblies only/Link all, you have to do the following:
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.** { *; }Code Shrinker to ProGuard or r8When 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."
Link SDK assemblies only/Link all, and did not follow the proguard steps mentioned aboveiOS & Android screenshots of the In-App Review
Under MIT, see LICENSE file.
暂无开放 Issues,或尚未同步最近议题。