我尝试了很多代码,但它没有打开App Store的评论标签。任何人都可以提供swift-3.Thanks的链接。
谢谢!
答案 0 :(得分:2)
使用此网址对我来说是完美的解决方案。它将用户直接带到Write a Review section
。 @Joseph Duffy的积分。 必须尝试
网址= itms-apps://itunes.apple.com/gb/app/idYOUR_APP_ID_HERE?action=write-review&mt=8
将 YOUR_APP_ID_HERE 替换为 AppId
有关示例代码,请尝试以下操作:
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!!")
}
此处showAlert是UIAlertController
的自定义函数。