问题
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.
回答1:
if let checkURL = NSURL(string: "http://www.itunes.com/yourAppLlink.html") {
if UIApplication.sharedApplication().openURL(checkURL) {
println("url sucefully opened")
}
} else {
println("invalid url")
}
回答2:
Try this-
var path: NSURL = NSURL(string: "itms-apps://itunes.apple.com/us/app/YOUR_App_id")!
UIApplication.sharedApplication().openURL(path)
来源:https://stackoverflow.com/questions/28715172/app-store-leave-a-review-rate-ios-8-swift