1

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.

vikingosegundo
  • 52,040
  • 14
  • 137
  • 178
  • 3
    So `[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps://itunes.apple.com/app/idYOUR_APP_ID"]];` does not work for you? – DarkDust Feb 25 '15 at 09:26

2 Answers2

6
if let checkURL = NSURL(string: "http://www.itunes.com/yourAppLlink.html") {
    if UIApplication.sharedApplication().openURL(checkURL) {
         println("url sucefully opened")
    }
} else {
    println("invalid url")
}
Leo Dabus
  • 229,809
  • 59
  • 489
  • 571
1

Try this-

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

UIApplication.sharedApplication().openURL(path)
JSA986
  • 5,870
  • 9
  • 45
  • 91
Naina Soni
  • 720
  • 5
  • 21