hap497 hap497 - 2 months ago 9
Swift Question

How can I launch an email client on ios using Swfit

In Android, I can launch an email client from my android application using its Intent mechanism.
In ios, how can I launch its email client from my ios application using Swift?

Thank you.

Answer
let url = NSURL(string: "mailto:jon.doe@mail.com")
UIApplication.sharedApplication().openURL(url)

Note that this works only on a device, not in the simulator.