MailCompositionService quit unexpectedly.

Trying to open a MFMailComposeViewController in the iOS9 and iOS9.1 simulator, I get:


MailCompositionService quit unexpectedly.


Click Reopen to open the application again. Click Report to see more detailed information and send a report to Apple.



Xcode Version 7.1.1 (7B1005)


Offending code is:


#import <MessageUI/MessageUI.h>


...


MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];

[self presentViewController:controller animated:YES completion:nil];


Am I missing something ? Anyone have the Mail Compose working on iOS simulator ?

Accepted Answer

The simulator doesn't support mail.

You should likely try testing mail functionality in a device.

This is unfortunately the correct answer. MFMailComposeViewController used to work on the simulator, but now doesn't, and this is not documented anywhere, it doesn't even display a log message. Eveyone that is trying to use a MFMailComposeViewController will probably waste a couple of hours getting it to fail on the simulator.


The thing have some very nasty defects related to enconding and content/type but those are unrelated to simulator.

MailCompositionService quit unexpectedly.
 
 
Q