I've got an app I'm working on that uses mfmailcomposeviewcontroller to create an email with an attached PDF.
In iOS 10, I've found that the "preview" of the PDF now shows up as blank:
The mail composer used to display as a preview of the PDF in the email without any issue up until iOS 9. If I send the email, the PDF is still attached and working just fine. Is this an issue with the Apple Mail app on iOS 10, or is there something else going on with the MFMailCompose? I've attached my code below:
NSData *immutableData = [NSData dataWithData:pdfData];
MFMailComposeViewController *mail=[[MFMailComposeViewController alloc]init];
mail.mailComposeDelegate = self;
[mail setSubject:@"Attachment Issue"];
[mail addAttachmentData:immutableData mimeType:@"image/pdf" fileName:@"Report.pdf"];
NSString * body = @"iOS 10 vs iOS 9";
[mail setMessageBody:body isHTML:NO];
[self presentViewController:mail animated:YES completion:nil];