Asking Customers for Ratings and Reviews from inside the app in iOS

From iOS 10 (10.3 to be precise), apple made it possible for the developers to ask for rating the app from inside the app itself. This is possible for us through SKStoreReviewController API. Let’s see what it was before and what it will be from now.



on a count of 1 to 10 , what would be your rating for this car 😵

Before iOS — 10.3 ( Even now we can do this :p )

If you want the user to rate the app, we normally redirect them to the appstore and the user can enter the rating there. We use the openUrl method to open the appstore.


@IBAction func rateUsButtonClicked(_ sender: Any) {rateApp(appId: “id1147613120”)}fileprivate func rateApp(appId: String) {openUrl(“itms-apps://” + appId)}fileprivate func openUrl(_ urlString:String) {let url = URL(string: urlString)!if #available(iOS 10.0, *) {, options: [:], completionHandler: nil)} else {UIApplication.shared.openURL(url)}}

And where do we get the id from??

Source: Stackoverflow Question

How get the ID :

  1. Log in to itunesconnect account
  2. Click on “My Apps”
  3. Click on “+” Button
  4. Create new iOS App
  5. Fill require details
  6. After filling all details goto your App
  7. Click on More Button
  8. View on AppStore
  9. It will redirect you to your App URL this will be universal
  10. Look Http URL

It will look something like this:

This is the classic way of asking the user to rate the app. We can still do this stuff. But from iOS 10.3, apple gives a much convenient way of doing this in few simple steps. This is to provide a standardised interface that users can trust, iOS 10.3 brought a built-in way to ask users to review the app, and it couldn’t be much easier to use.

How to use SKStoreReviewController??

Just follow these simple steps:

  • First, add this import to your code:
import StoreKit
  • Then at some point in your app call this method:
if #available( iOS 10.3,*){

That’s it !!!. The OS will show a standard rating view inside the app like this:

Sample image provided by apple

Are there any limitations? Can we call this requestReview() method inside a button action and call this on every button click?

May be we can. But you shouldn’t do this. Why?? Because apple told not to do it this way.

Read the ios human interface guidelines.

When to use SKStoreReviewController??

It’s important to ask for feedback at appropriate times. Keep these considerations in mind when asking people to rate your app.

Ask for a rating only after the user has demonstrated engagement with your app. For example, prompt the user upon the completion of a game level or productivity task. Never ask for a rating on first launch or during onboarding. Allow ample time to form an opinion.

Don’t interrupt the user, especially when they’re performing a time-sensitive or stressful task. Look for logical pauses or stopping points, where a rating request makes the most sense.

Don’t be a pest. Repeated rating prompts can be irritating, and may even negatively influence the user’s opinion of your app. Allow at least a week or two between rating requests and only prompt again after the user has demonstrated additional engagement with your app.

If the user hasn’t already given feedback and a request hasn’t been made too recently, the system displays an in-app prompt that asks for a rating and an optional written review. The user can supply feedback or dismiss the prompt with a single tap. (In Settings, the user can also opt out of receiving these rating prompts for all apps they have installed.) The system automatically limits the display of the prompt to three occurrences per app within a 365-day period.

Prefer the system-provided prompt. The system’s rating prompt offers a familiar, efficient experience that’s designed to engage the user with minimal impact.

Don’t use buttons or other controls to request feedback. Since the system limits how often rating prompts occur, attempting to request feedback in response to a control may result in no rating prompt being displayed.

Based on the documentations, the request review function uses a proprietary method to analyze if it is a suitable time to ask user for a review, therefore it is strongly recommended that developers avoid calling this function in response to a user action.


Keep these points in mind while coding:

  1. When you are in development, requesting a review will always show the review user interface, but you can’t submit an actual review.
  2. When you are using TestFlight to test your app, requesting a review will do nothing at all. ie, none of the requests will be approved, so do not panic if review dialog does not show up in your Testflight sessions. Once the app goes to production, it would use the Apple’s methods to show the dialog whenever it is suitable.

Consider storing a simple run count for your app using UserDefaults, then calling the method after your app has been run 10 times. By that point it’s pretty clear the user keeps coming back to your app, so hopefully you have more chance of getting a positive review!

Simply choose when to prompt users to rate your app, for up to three prompts in a 365-day period. Customers will submit a rating through the standardized prompt, and can authenticate with Touch ID to write and submit a review.

When to ask for review:

The main step is to ask for the review in a proper time. I would suggest to call this function whenever user has accomplished a major work in the app. It varies from app to app. I made a custom class to track the number of app running sessions . Please check the gist below. incrementAppOpenedCount() method is called from appdelegate and an int value in UserDefaults is incremented. The method checkAndAskForReview() is called whenever the user is happy 😊 (technically I check if it is the 10th 50th or every 100th session). You can either use this or implement your own logic.


I am using Defaults for readability. I have added the following code in my constants file.

let Defaults = UserDefaults.standard

So that I don’t have to use UserDefaults.standard everywhere. Also, I made a struct in my constants file named UserDefaultsKeys and added all the keys that I use inside the app.

struct UserDefaultsKeys {static let APP_OPENED_COUNT = “APP_OPENED_COUNT”}


If you enjoyed reading this post, please share and recommend it so others can find it 💚💚💚💚💚💚 !!!!

You can follow me on Medium for fresh articles. Connect with me on LinkedIn.

If you have any comment, question, or recommendation, feel free to post them in the comment section below!