Manuel
Manuel

Reputation: 15042

Use SKStoreProductViewController or SKStoreReviewController for app rating / review?

There are numerous articles on SO that the SKStoreProductViewController disables the "Write a review" button. However all of these SO articles are years old and the apple docs for SKStoreProductViewController do not mention that restriction.

When tested in iOS 9.3.2 the button was not displayed as disabled but simply nothing happened when tapping it, which is not only confusing to developers but also to users and that doesn't seem right.

So is it true for iOS 9 that


Update for iOS 10.3+

The accepted answer explains the difference between SKStoreProductViewController and SKStoreReviewController for use with app rating / review. The original question was written before the introduction of SKStoreReviewController.

Upvotes: 12

Views: 9737

Answers (2)

Manuel
Manuel

Reputation: 15042

Apparently the SKStoreProductViewController is only intended for purchasing apps on the App Store and not for reviewing products. That can be implicitly understood from the Apple docs:

A SKStoreProductViewController object presents a store that allows the user to purchase other media from the App Store. For example, your app might display the store to allow the user to purchase another app.

As long as this restriction exists, the only workaround is deep linking to the App Store app, e.g.

let url = NSURLComponents(string: "itms-apps://itunes.apple.com/app/id\(yourAppleAppId)")!
UIApplication.sharedApplication().openURL(url)

Update for iOS 10.3+

The SKStoreReviewController allows users to rate an app directly from within the app through a dialog box. The only downsite is that you can only request StoreKit to display the dialog, but can't be sure if it will.

Tells StoreKit to ask the user to rate or review your app, if appropriate.

SKStoreReviewController

Be aware that Apple is likely to disallow custom app rating and review prompts in the near future with the introduction of SKStoreReviewController. The app review guidelines state:

Use the provided API to prompt users to review your app; this functionality allows customers to provide an App Store rating and review without the inconvenience of leaving your app, and we will disallow custom review prompts.

A current disadvantage, and probably the reason why custom review prompts are still allowed, is that Apple has yet to provide an API to get review metrics and post responses to written reviews. The only current solution via iTunes Connect which is not practical for large scales and performance requirements in customer service environments.

Upvotes: 15

Alex
Alex

Reputation: 1051

What you are looking for is

import StoreKit

func someFunction() {
 SKStoreReviewController.requestReview()
}

but its has been just released with 10.3, so you will still need some fallback method for older versions as described above

Upvotes: 7

Related Questions