아래의 코드를 모두 iPhone & iPad 용으로 사용하고 있습니다.iPad에서 MFMailComposeViewController 충돌
if([MFMailComposeViewController canSendMail])
{
dispatch_async(dispatch_get_main_queue(), ^{
MFMailComposeViewController *mailcomposer=[[MFMailComposeViewController alloc] init];
[mailcomposer setMailComposeDelegate:self];
[mailcomposer setToRecipients:[NSArray arrayWithObject:recipients]];
[self presentViewController:mailcomposer animated:YES completion:nil];
});
}
iPhone에서 잘 작동하지만 iPad의 경우에는 모달이 열리고 몇 초 후에 자동으로 해제됩니다. 디버그 모드에 넣은 후 로그 아래에 있습니다.
viewServiceDidTerminateWithError: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 3.)" UserInfo=0x7fbb904040f0 {Message=Service Connection Interrupted}
<MFMailComposeRemoteViewController: 0x7fbb928b3250> timed out waiting for fence barrier from com.apple.MailCompositionService
iPad 또는 iPad 시뮬레이터? 시뮬레이터에서는 사용할 수 없습니다. –
iPad 시뮬레이터 ..... ooo ... –
MailCompose Controlelr은 물리적 장치/iPad에서 작동합니다. –