Determine if the iPhone / iPad email client has been configured / valid

I had a problem with the application crashing when opening MFMailComposeViewController, it worked perfectly on the simulator and crashed on it.

After several hours, I realized that the reason was that the internal email client on the iPad, which I use for testing, was not installed / configured - after installing the email on the device, everything worked fine.

So my question is: can I determine if the device’s email client has been configured and valid in order to avoid a repeated failure on devices that have not yet installed their internal iPad / iPhone email client?

+5
source share
1

canSendMail:

if ([MFMailComposeViewController canSendMail]) {
  // Yes we can send mail.
}

, mail, true.

+13

All Articles