DEV Community

Cover image for Improving your iOS app ratings with SKStoreReviewController
Raheel
Raheel

Posted on

Improving your iOS app ratings with SKStoreReviewController

Why Ratings Matter

One of the first things that users look at before installing an app is the app's rating on the App Store. Having a good rating increases the app's visibility on the App Store; the higher the rating, the higher it will rank. Research shows that users with a negative experience are more likely to rate the app than those who have had a positive experience. That's why it is so important to ask your current users to rate your app. Asking the user to go to the app store to rate your app isn't effective and also annoying to the user. A better experience for the user is to rate the app without having to leave the screen they are on. This is where SKStoreReviewController comes in. It is used for displaying in-app prompt to rate the app.

Guidelines

Apple recommends that in-app rating prompt be only displayed after the user has shown some engagement with the app. For example, if they were able to successfully perform a task, then it makes sense to prompt them for the review. They shouldn't be prompted on app launch, button click, or if they are in the middle of a time-sensitive task. Allow the user to form an opinion of the app before asking for a review. In short, Apple says "Don't be a pest."

Using SKStoreReviewController

While using SKStoreReviewController is very simple, the logic for when to use it is the complex part. Here is a sample code:

import StoreKit
...
    if shouldDisplayReview(){
        SKStoreReviewController.requestReview()
        reviewDisplayed()
    }
...
Enter fullscreen mode Exit fullscreen mode

The shouldDisplayReview method would contain logic that determines if the user is likely having a good experience in the app and hasn't been shown the prompt recently. For example, you can track the number of times the user has opened the app or successfully completed a task in UserDefaults. If the count is above a certain number, you should display the review.

The reviewDisplayed method stores the date when the prompt was displayed. It can also reset any counters you use to determine if the user is having a good experience.

Limitations

There are many limitations on using SKStoreReviewController:

  • You can prompt the user for a rating up to three times within a 365-day period
  • Users can go into Settings and turn off in-app ratings prompt
  • There are no callbacks in SKStoreReviewController. The app has no way of know if the user rated the app or not.
  • The ratings prompt will displayed on XCode builds but the Submit button is grayed out.
  • On TestFlight builds, the ratings prompt will not be displayed at all. You will need to create an ad-hoc build if you need to have others test this screen. In my next lesson, I will show you how to create an ad-hoc build.

Top comments (0)