添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Customer feedback and ratings are essential for an app to succeed.

And the only way to ask for one is via SKStoreReviewController .

How to request for a rating and review

SKStoreReviewController is a simple class. It only exposes one method to ask the user to rate or review the app, which is requestReview() .

Here is how to ask for a user's rating in iOS.

import StoreKit

class ViewController: UIViewController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)

if let windowScene = view.window?.windowScene {
SKStoreReviewController.requestReview(in: windowScene)
}
}
}

This is what the UI looks like.

Request review popup dialog.

The API for macOS has a minor difference. We don't need to provide any argument in macOS API.

SKStoreReviewController.requestReview()

In Xcode 15, the review prompt doesn't show up on macOS. I don't know if it is just my machine or not.

I remember it used to work in the old version of Mac and Xcode.

You can easily support sarunw.com by checking out this sponsor.

Sponsor sarunw.com and reach thousands of iOS developers.

SKStoreReviewController Limitations

Apple is quite serious when it comes to user experiences, and they want to control how often we can ask for a user's review.

So, even if you explicitly call SKStoreReviewController.requestReview(in: windowScene) or SKStoreReviewController.requestReview() , the review popup might not showing up.

In a debug environment, the popup will always show to facilitate debugging.

Here are the criteria Apple uses to decide whether to show it or not.

If the person hasn't rated or reviewed your app on this device , StoreKit displays the ratings and review request a maximum of three times within a 365-day period .

If the person has rated or reviewed your app on this device , StoreKit displays the ratings and review request if the app version is new , and if more than 365 days have passed since the person’s previous review.

Even if all criteria are met, there is a chance that the prompt will not display due to Apple's hidden criteria, e.g., frequency. So, don't call the method in response to a button tap or other user actions .

You can easily support sarunw.com by checking out this sponsor.

Sponsor sarunw.com and reach thousands of iOS developers.

When should I request a rating

Since the number of times you can request a review is limited, you should call it when it matters.

You probably want to ask for a review when users will likely get one .

There are no rules for this, but I can give some examples.

  • When users repeatedly come back to your app. This shows users are happy with your app and find it helpful.
  • After significant events, e.g., completed a game level or finished some tasks.
  • In summary, you should ask for a review when users feel positive about your apps.

    Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.

    If you enjoy my writing, please check out my Patreon https://www.patreon.com/sarunw and become my supporter. Sharing the article is also greatly appreciated.