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 Swift 4.2+ and iOS 9+
let appURL = URL(string: "mailto:TEST@EXAMPLE.COM")! if #available(iOS 10.0, *) { UIApplication.shared.open(appURL, options: [:], completionHandler: nil) } else { UIApplication.shared.openURL(appURL) }
Replace TEST@EXAMPLE.COM with your desired email address.