0

My requirement is to rate the app based on a custom alert. Therefore i've implemented the code bellow, and once I selected the "yes" option I gets an error saying "The item you requested is not currently available in the "country name" Store". Hence, on itunes it says my app is available for all countries. What am I missing here. My code as below

func showRateMeAlert() {
    let appId = "123456"
    let appDel = AppDelegate()
    let url = URL(string: "itms-apps://itunes.apple.com/app/"+appId)
    var alert = UIAlertController(title: "Please rate this app", message: "Thanks for using <Appname>", preferredStyle: UIAlertControllerStyle.alert)
    alert.addAction(UIAlertAction(title: "Yes", style: UIAlertActionStyle.default, handler: { alertAction in
    UIApplication.shared.open(url!, options: [:], completionHandler: nil)
            alert.dismiss(animated: true, completion: nil)
    }))
    alert.addAction(UIAlertAction(title: "Never", style: UIAlertActionStyle.default, handler: { alertAction in
            alert.dismiss(animated: true, completion: nil)
    }))
    alert.addAction(UIAlertAction(title: "Later", style: UIAlertActionStyle.default, handler: { alertAction in
    UserDefaults.standard.set(true, forKey: appDel.RATE_LATER)
        alert.dismiss(animated: true, completion: nil)
    }))
    self.present(alert, animated: true, completion: nil)
}

enter image description here

on iTunes

enter image description here

Riajur Rahman
  • 1,976
  • 19
  • 28
danu
  • 1,079
  • 5
  • 16
  • 48

0 Answers0