App Store Leave a Review/Rate iOS 8 Swift

2019-09-02 05:36发布

I have a cell in the settings table view where i want to send the users straight to the Appstore and open the app page so they can leave a review. There is plenty of content about that in Stackoverflow but none worked for me in iOS8 with Swift.

Thanks.

2条回答
做自己的国王
2楼-- · 2019-09-02 06:10
if let checkURL = NSURL(string: "http://www.itunes.com/yourAppLlink.html") {
    if UIApplication.sharedApplication().openURL(checkURL) {
         println("url sucefully opened")
    }
} else {
    println("invalid url")
}
查看更多
叛逆
3楼-- · 2019-09-02 06:16

Try this-

var path: NSURL = NSURL(string: "itms-apps://itunes.apple.com/us/app/YOUR_App_id")!

UIApplication.sharedApplication().openURL(path)
查看更多
登录 后发表回答