Ios SKStoreReviewController.requestReview()在Live App中不工作
这是我请求审核的代码:Ios SKStoreReviewController.requestReview()在Live App中不工作,ios,swift,skstorereviewcontroller,Ios,Swift,Skstorereviewcontroller,这是我请求审核的代码: if #available(iOS 10.3, *) { SKStoreReviewController.requestReview() } else{ print("Review is not available with in the app") } 在开发模式下,它工作正常&我可以得到如下弹出窗口: 但在从appstore下载的Live应用程序中,该应用
if #available(iOS 10.3, *) {
SKStoreReviewController.requestReview()
}
else{
print("Review is not available with in the app")
}
在开发模式下,它工作正常&我可以得到如下弹出窗口:
但在从appstore下载的Live应用程序中,该应用程序并没有显示此分级弹出窗口,若用户点击分级按钮,则不会发生任何事情
来自:
尽管在应用程序的用户体验流中有意义时,您应该调用此方法,但评级/审核请求视图的实际显示受应用程序商店策略的控制。由于此方法可能会或可能不会显示警报,因此不适合在点击按钮或其他用户操作时调用它
(突出我的)
如果你有一个评级按钮,就像你在问题中说的那样,你不应该期望它显示提示
只有在以下情况下才会显示提示:
@IBAction func requestReviewManually() {
// Note: Replace the XXXXXXXXXX below with the App Store ID for your app
// You can find the App Store ID in your app's product URL
guard let writeReviewURL = URL(string: "https://itunes.apple.com/app/idXXXXXXXXXX?action=write-review")
else { fatalError("Expected a valid URL") }
UIApplication.shared.open(writeReviewURL, options: [:], completionHandler: nil)
}