-2

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!

  • see http://stackoverflow.com/questions/28715172/app-store-leave-a-review-rate-ios-8-swift?rq=1. It should be the same, I implemented it very similar last week – Scriptable Mar 07 '17 at 14:17

1 Answers1

6

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.

Ankit Kumar Gupta
  • 3,994
  • 4
  • 31
  • 54