2017-03-07 60 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

我可以再問一些問題嗎? –

相關問題