UIActionSheetボタンを使用してメッセージ作成シートを作成すると、次のエラーが発生します。申し訳ありませんが、これらはまだ私にはあまり意味がありません-まだ学習中です:-)
誰か助けてもらえますか?
これらは、発生する問題の原因です。
これはログにあります:
2012-06-16 19:10:43.437マルチWeb [2665:4013] XPCProxyが不正なメッセージを受信しました:ターゲットがbodyFinishedDrawingのメソッドシグネチャを提供しませんでした2012-06-16 19:10:43.489マルチWeb [2665:907] _serviceViewControllerReady:error :Error Domain = XPCObjectsErrorDomain Code = 3 "操作を完了できませんでした。(XPCObjectsErrorDomainエラー3)"
乾杯ジェフ
if ([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
mailer.mailComposeDelegate = self;
NSString *subject = [[NSString alloc] initWithFormat:@"Multi Web - Sending %@.txt", _documentFile];
[mailer setSubject:subject];
// Attach an image to the email
NSString *pathFile01 = [NSString stringWithFormat:_documentTXTPath];
NSURL *pdfURLFile01 = [NSURL URLWithString:pathFile01];
NSData *pdfDataFile01 = [NSData dataWithContentsOfURL:pdfURLFile01];
NSString *fileName = [[NSString alloc] initWithFormat:@"%@.txt", _documentFile];
[mailer addAttachmentData:pdfDataFile01 mimeType:@"application/txt" fileName:fileName];
NSString *emailBody =
@"Hi,<br><br>Please find attached the note exported from Multi Web.<br/><br/>Thanks you for using the app.<br/><br/>Kind Regards,<br/>Multi Web Team.";
[mailer setMessageBody:emailBody isHTML:YES];
[self presentModalViewController:mailer animated:YES];
}
// Remove the mail view
[self dismissModalViewControllerAnimated:YES];
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
{
switch (result)
{
case MFMailComposeResultCancelled:
NSLog(@"Mail cancelled: you cancelled the operation and no email message was queued.");
break;
case MFMailComposeResultSaved:
NSLog(@"Mail saved: you saved the email message in the drafts folder.");
break;
case MFMailComposeResultSent:
NSLog(@"Mail send: the email message is queued in the outbox. It is ready to send.");
break;
case MFMailComposeResultFailed:
NSLog(@"Mail failed: the email message was not saved or queued, possibly due to an error.");
break;
default:
NSLog(@"Mail not sent.");
break;
}
// Remove the mail view
[self dismissModalViewControllerAnimated:YES];
}