Search code examples
iosswiftemailmfmailcomposer

MFMailComposeViewController Crash on device 8.2


Why is this crashing only on on a device with 8.2? on other versions works just fine and even on simulator with 8.2 works fine...

var mailPicer = MFMailComposeViewController()
    mailPicer.mailComposeDelegate = self
    mailPicer.setCcRecipients(["bla@dad.com"])
    mailPicer.setEditing(true, animated: true)
    mailPicer.setSubject("I have something to tell you")
    mailPicer.setMessageBody("bla bbla`", isHTML: true)
    self.presentViewController(mailPicer, animated: true, completion: nil) 

I am not getting any log for the crash as well...

Any thoughts?


Solution

  • Check if MFMailComposeViewController.canSendMail()