Starting iOS 10.3, Apple is limiting the review prompt (Rate This App) to 3 times a year and it can be turned off in the user's settings.
Q: How do we detect that the 3 times limit has reached or if the user has turned off RTA so in the app I won't show a popup saying: "Did you like the app? If yes, can you write a review? [Yes/No]" because then, if the user taps Yes, nothing will show up.
There is really not much information here from the official documentation: https://developer.apple.com/reference/storekit/skstorereviewcontroller
Although you should call this method when it makes sense in the user experience flow of your app, the actual display of a rating/review request view is governed by App Store policy. Because this method may or may not present an alert, it's not appropriate to call it in response to a button tap or other user action.
Asking users if they like the app might lead to your app being rejected. Here is an example: https://twitter.com/pietbrauer/status/791883047373246464
In case the link dies here is an excerpt of Apples response:
3.2.2 ... your app includes content and features that can manipulate the user reviews or chart rankings on the App Store. Specifically, your app filters user reviews and only directs users who intend to rate your app 4 - 5 stars to complete a rating on the App Store...
I personally believe that this can be a valid tactic if you genuinely try to resolve the users issue, and still give them an opportunity to leave a review afterwards, but the question remains if Apple will see it that way.
[SKStoreReviewController requestReview]
to get a review.SKStoreReviewController
suggest using action=write-review
as a query parameter to go directly to the reviews page.Here is a simple implementation:
// make sure we the current iOS version supports in app reviews
if ([SKStoreReviewController class])
{
NSUInteger windowCount = [UIApplication sharedApplication].windows.count;
[SKStoreReviewController requestReview];
// give the review controller some time to display the popup
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
if (windowCount < [UIApplication sharedApplication].windows.count)
{
// assume review popup showed instead of some other system alert
// for example show "thank you"
}
else
{
// open app store to leave review
NSURL *reviewUrl = [NSURL URLWithString:@"{your-app-url}?action=write-review"];
[[UIApplication sharedApplication] openURL:reviewUrl];
}
});
}
Note: I have not submitted this code to the App Store, so this is only theoretical.