1

NOTE: I have tried every possible solution I have found on SO, and none of them seem to resolve my issue. Hence I have posted a new question.

Scenario:

I have the following view hierarchy, and I am attempting to present MFMailComposeViewController from the "Request an Invite" view.

enter image description here

As you can see, I'm presenting the mail compose controller from a presented controller, but I doubt this is the issues, since I have tried presenting it on the root view controller itself also(from it's own code, of course).

The code I have used to present the mail composer is as follows:

- (IBAction) requestButtonPressed:(id)sender {

    MFMailComposeViewController* composeController = [[MFMailComposeViewController alloc] init];
    [composeController setSubject:@"Too many happy memories sucked out. Now I'm just miserable."];
    [composeController setToRecipients:[NSArray arrayWithObject:@"customerCare@azkaban.org"]];
    [composeController setMailComposeDelegate:self];

    [self presentViewController:composeController animated:YES completion:nil];
}

Problem:

After I present the MFMailComposeViewController, it dismisses itself after a delay of 2 or 3 seconds with the following log:

... viewServiceDidTerminateWithError: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 3.)" UserInfo=0x7fd4b0cc86e0 {Message=Service Connection Interrupted}

... < MFMailComposeRemoteViewController: 0x7fd4b0d9b660 > timed out waiting for fence barrier from com.apple.MailCompositionService

And the delegate method mailComposeController:didFinishWithResult:error: is called with result MFMailComposeResultCancelled.

I have tried all possible solutions I have come across SO, including removing UINavigationBar appearance code, but nothing seems to work.

Any help would be greatly appreciated.

n00bProgrammer
  • 4,261
  • 3
  • 32
  • 60

0 Answers0