How can I launch an email client on ios using Swfit

前端 未结 4 614
误落风尘
误落风尘 2021-01-02 06:04

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 Swif

4条回答
  •  孤城傲影
    2021-01-02 06:24

    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.

提交回复
热议问题