I have tried so many codes but it's not opening the Review tab of App Store.Can any one please provide the link for swift-3.Thanks in advance.
Thanks!
I have tried so many codes but it's not opening the Review tab of App Store.Can any one please provide the link for swift-3.Thanks in advance.
Thanks!
Using this URL was the perfect solution for me. It takes the user directly to the Write a Review section
. Credits to @Joseph Duffy. MUST TRY
URL = itms-apps://itunes.apple.com/gb/app/idYOUR_APP_ID_HERE?action=write-review&mt=8
Replace YOUR_APP_ID_HERE with your AppId
For a sample code try this :
Swift 3, Xcode 8.2.1 :
let openAppStoreForRating = "itms-apps://itunes.apple.com/gb/app/id1136613532?action=write-review&mt=8"
if UIApplication.shared.canOpenURL(URL(string: openAppStoreForRating)!) {
UIApplication.shared.openURL(URL(string: openAppStoreForRating)!)
} else {
showAlert(title: "Cannot open AppStore",message: "Please select our app from the AppStore and write a review for us. Thanks!!")
}
Here showAlert is a custom function for an UIAlertController
.