App Store发表评论/评级iOS 8 Swift

0 cocoa-touch ios swift

我在设置表视图中有一个单元格,我想将用户直接发送到Appstore并打开应用页面,以便他们可以留下评论.在Stackoverflow中有很多关于它的内容,但在iOS8和Swift中没有一个对我有用.

谢谢.

Leo*_*bus 5

if let checkURL = NSURL(string: "http://www.itunes.com/yourAppLlink.html") {
    if UIApplication.sharedApplication().openURL(checkURL) {
         println("url sucefully opened")
    }
} else {
    println("invalid url")
}
Run Code Online (Sandbox Code Playgroud)