adee
adee

Reputation: 87

open write review page using SKStore​Review​Controller with query parameters "action=write-review"

https://developer.apple.com/documentation/storekit/skstorereviewcontroller/2851536-requestreview

Apple document suggest to automatically open a page on which users can write a review in the App Store, append the query parameter action=write-review to your product URL.

I want to redirect the user to write a comment page of the app on the app store. I am new to iOS please guide me to achieve this functionality.

Thank you.

Upvotes: 0

Views: 235

Answers (1)

arpan.r
arpan.r

Reputation: 1981

here i what i am using

let appID = "Your App ID on App Store"
let urlStr = "itms-apps://itunes.apple.com/app/id\(appID)?action=write-review" 
if let url = URL(string: urlStr), UIApplication.shared.canOpenURL(url) {
    if #available(iOS 10.0, *) {
        UIApplication.shared.open(url, options: [:], completionHandler: nil)
    } else {
        UIApplication.shared.openURL(url)
    }
}

Upvotes: 1

Related Questions