Launch Apple Mail App from within my own App?

后端 未结 15 2310
心在旅途
心在旅途 2020-11-29 01:59

What I already found is

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@\"mailto:\"]];

But I just want to open the Mail ap

15条回答
  •  日久生厌
    2020-11-29 02:27

    Swift 4 / 5 to open default Mail App without compose view. If Mail app is removed, it automatically shows UIAlert with options to redownload app :)

    UIApplication.shared.open(URL(string: "message:")!, options: [:], completionHandler: nil)
    

提交回复
热议问题