I think there's an issue with the MFMailComposeViewController in iOS9, at least on my new iPad mini 4. Even using the simplest test code I doesn't work. For example, using:
if(![MFMailComposeViewController canSendMail]) {
return;
}
MFMailComposeViewController *controller = [MFMailComposeViewController new];
controller.mailComposeDelegate = self;
[controller setSubject:@"Test"];
[controller setMessageBody:@"Test" isHTML:FALSE];
[self presentViewController:controller animated:TRUE completion:^{
}];
The App becomes completely unresponsive, NOTHING happens on the screen, I see no draft e-mail or something like that.
Important things to know:
YES, my device can send mail, I've used the default canSendMail check
I've tried strong-referencing the controller but it had no effect
The exact same code works perfectly on another iPad running iOS8
In the simulator it DOES show the draft but closes immediately saying that "MailCompositionService suddenly quit"
Anybody any ideas?
Ok I created a complete barebone test-App and found out it DID work there so something else was the issue. I finally discovered the issue was that the App showed a tableview with about 50 rows (I did use recycling) but that created a memory issue... (I did check with Instruments but no leaks). Anyway, I found out if I present the mailcontroller when NOT also showing the tableview it had no issues at all.. You'd think that the iPad mini 4 would be capable of both.
So the lesson learned is, create a complete barebone test-app first before posting questions on SO..