2017-03-07 56 views

回答

1

使用此URL对我来说是完美的解决方案。它将用户直接带到Write a Review section。感谢@Joseph Duffy。 必须设法

URL = itms-apps://itunes.apple.com/gb/app/idYOUR_APP_ID_HERE?action=write-review&mt=8 更换YOUR_APP_ID_HERE的AppId

有关示例代码试试这个:

斯威夫特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的自定义函数。

+0

谢谢!这正是我正在寻找的。 –

+0

如果你喜欢,请选择它作为你的问题的答案。 谢谢 –

+0

我可以再问一些问题吗? –

相关问题