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.

Image for post
Image for post
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 )

@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??

How to use SKStoreReviewController??

import StoreKit
if #available( iOS 10.3,*){
Image for post
Image for post
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?

When to use SKStoreReviewController??


When to ask for review:

let Defaults = UserDefaults.standard
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 💚💚💚💚💚💚 !!!!

Written by

iOS and tvOS developer, dreamer, photographer 🤨

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store