Search code examples
iosobjective-cratingreview

Cannot open Rating page in App Store from my App in iOS 10


I am trying to open my registered app's Rating and Review Page directly from my app. The App isn't live yet, but I've added it in the itunes account and got the Apple ID. Code which I've tried is

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=XXXXXXXXXX&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software"]];

where XXXXXXXXXX is my apple ID. Above code opens app store with an error message: Your request produced an error. [newNullResponse].


Solution

  • The URL to your app would not be available until your app is in the store.

    For iOS 10.3 upwards, Apple Provides a way to present a native app rating popup in your app, that sends the ratings straight to the store. It is their recommended way of requesting ratings.

    To make it show up, you need to call this, in Swift:

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

    If you still want to use the URL, the following will redirect you to the app in itunes https://itunes.apple.com/en/app/idxxxxxxxxx where the xxxxxxxxx is the App Id from itunes connect

    You might also want to check this answer: ITunes review URL and iOS 7 (ask user to rate our app) AppStore show a blank page