2

First, i create send email for ios 7 but when running for ios 8 cannot type destination email address and others, after that pop up email close .. is there special process to send email for ios 8 ?

// Open Email and add attachment
MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init];
NSArray *recipients = @[@""];
mailController.mailComposeDelegate = self;
[mailController setToRecipients:recipients];
[mailController setSubject:@"File"];
NSData *attachment = [[NSData alloc] initWithContentsOfFile:xlsPath];
[mailController addAttachmentData:attachment   mimeType:@"application/vnd.ms-excel" fileName:@"Export.xls"];

mailController.navigationBar.tintColor = [UIColor whiteColor];
[self.navigationController presentViewController:mailController animated:YES completion:nil];
Fahim Parkar
  • 30,974
  • 45
  • 160
  • 276
M. Johnson
  • 839
  • 6
  • 13
  • 22
  • Are you testing on a device or the simulator? – Chris Stokes Mar 17 '15 at 09:49
  • device, if i test devise using ios 8 error, cannot type destination email address and others.. – M. Johnson Mar 17 '15 at 09:55
  • 1
    I would have a look at the answer to this question for the proper way to use an MFMailComposeViewController - [I have REAL misunderstanding with MFMailComposeViewController](http://stackoverflow.com/questions/25604552/i-have-real-misunderstanding-with-mfmailcomposeviewcontroller-in-swift-ios8-in) - ignore the fact the question mentions Swift. – Chris Stokes Mar 17 '15 at 09:59

0 Answers0