Im working on a simple swift app where the user inputs an email address and presses a button which opens the mail app, with the entered address in the address bar. I know ho
For those of us still lagging behind on Swift 2.3 here is Gordon's answer in our syntax:
let email = "foo@bar.com" if let url = NSURL(string: "mailto:\(email)") { UIApplication.sharedApplication().openURL(url) }