SKStore​Review​Controller, How to use it in a correct way?

SKStoreReviewController is available in iOS 10.3 and later.

According to APPLE’s Documents:

You can ask users to rate or review your app while they’re using it,
without sending them to the App Store.You determine the points in the
user experience at which it makes sense to call the API and the system
takes care of the rest.

Inorder to display Rate/Review inside the app, you have to add StoreKitframework.

Please find the Sample code for both language:

Objective C:

#import <StoreKit/StoreKit.h>

- (void)DisplayReviewController {
    if([SKStoreReviewController class]){
       [SKStoreReviewController requestReview] ;
    }
}

since xCode 9 you can do:

#import <StoreKit/StoreKit.h>

- (void)DisplayReviewController {
    if (@available(iOS 10.3, *)) {
        [SKStoreReviewController requestReview];
    }
}

Swift:

import StoreKit

func DisplayReviewController {
    if #available( iOS 10.3,*){
        SKStoreReviewController.requestReview()
    }
}

Update: Ask for a rating only after the user has demonstrated engagement with your app

Leave a Comment