Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Closebool Value indicating whether the underlying API is available or not. False indicates that the iOS version isn't recent enough or that the StoreKit framework is not linked with the app.
Request App Store rating and review from the user.
Use this method to indicate when it makes sense within the user experience flow of your application to ask the user for a review. Don't use buttons or other controls to request feedback because the actual display of a rating request is rate-limited and the user can opt-out of receiving these prompts. Make sure the user has demonstrated an engagement with your application before asking for a review. This will display the default Apple prompt that cannot be modified.
using System; using UnityEngine; using UnityEngine.iOS;
public class RequestStoreReviewExample : MonoBehaviour { bool reviewRequested = false;
void Start() { // Note: It is advised to request AppStore review after the user interacts with your application somehow, so doing it in Start wouldn't be ideal in real scenario. RequestReview(); }
void RequestReview() { if (reviewRequested == false) { bool popupShown = Device.RequestStoreReview(); if (popupShown) { // The review popup was presented to the user, set "reviewRequested" to "true" to reflect that // Note: there's no way to check if the user actually gave a review for the app or cancelled the popup. reviewRequested = true; } else { // The review popup wasn't presented. Log a message and reset "reviewRequested" so you can revisit this in the future. Debug.Log("iOS version is too low or StoreKit framework was not linked."); reviewRequested = false; } } } }
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.