我的要求是根据自定义提醒对应用进行评分。因此,我已经实施了以下代码,一旦我选择了"是"选项我收到错误说"您请求的项目目前不在"国家/地区名称"商店&#34 ;.因此,在itunes上它说我的应用程序适用于所有国家/地区。我在这里想念的是什么我的代码如下
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)
}
在iTunes上