Guy van
I run my own story for 4 hours and I just realized that maybe I'm not crazy or stupid and that the composer is not working in iOS8.1
So this is my code, nothing unusual:
MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init];
mail.mailComposeDelegate = self;
if ([MFMailComposeViewController canSendMail]) {
[mail setToRecipients:[NSArray arrayWithObjects:@"email@email.com",nil]];
[mail setSubject:@"Subject of Email"];
[mail setMessageBody:@"Message of email" isHTML:NO];
[self presentViewController:mail animated:YES completion:NULL]; }
In iOS 8.1, I get a mail box with an object and the application crashes.
In iOS 7.1, I get a mail box with the body and body of the message, and all this is good.
Is there something I'm missing in iOS8.1 or is this a bug?
thank
PS: it crashes because it cannot complete the email with either the recipient or the body of the message. Here is part of the crash report:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSRegularExpression enumerateMatchesInString:options:range:usingBlock:]: nil argument' terminating with uncaught exception of type NSException abort() called CoreSimulator 110.4 - Device: iPhone 5 - Runtime: iOS 8.1 (12B411) - DeviceType: iPhone 5
Or:
<MFMailComposeRemoteViewController: 0x7c0c1e00> timed out waiting for fence barrier from com.apple.MailCompositionService
I imported the framework, headers and made a delegate.
source
share