Search code examples
iphonexcodeipadxcode4mfmailcomposeviewcontroller

MFMailComposeViewController app crash in ipad


I have a problem in MFMailComposeViewController.

if no one login in mail and i try to open this view, app crashes how to solve this?

if i login frommail in ipad and after that i try to load this its working fine.

Thanks,

Shyam Parmar


Solution

  • As far as I know the MFMailComposer requires a mail account in-order to send mail so if an account is not set up it will cause problems. you can check if the mfmailcomposer can send mail through its method [MFMailComposeViewController canSendMail];