2

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?

Bob de Graaf
  • 2,630
  • 1
  • 25
  • 43
  • 1
    I'm having the same issue. It says `reason: '-[__NSArrayI isEqualToString:]:` as the reason. Somewhere it things an `NSString` is an `NSArray`. – KVISH Sep 22 '15 at 03:13
  • Also, I noticed it works fine on an iPhone 6 with iOS 9. It fails on the simulators and on iPads. – KVISH Sep 22 '15 at 03:38
  • @KVISH yeah I think the array is the recipients, perhaps just a crazy bug? Perhaps I should report it – Bob de Graaf Sep 22 '15 at 17:05

1 Answers1

1

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..

Bob de Graaf
  • 2,630
  • 1
  • 25
  • 43