私はMessageUIフレームワークを使用して、添付ファイル付きメールを自分のアプリケーションから送信しました。 しかし、私は次のエラーを得た、iphone電子メールの添付ファイル
2009-09-07 19:52:23.483 emailTest[11711:5b17]
Error loading /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/DataClassMigrators/AccountMigrator.migrator/AccountMigrator: dlopen(/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/DataClassMigrators/AccountMigrator.migrator/AccountMigrator, 265): Library not loaded: /System/Library/PrivateFrameworks/MobileWirelessSync.framework/MobileWirelessSync
Referenced from: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/DataClassMigrators/AccountMigrator.migrator/AccountMigrator
Reason: image not found
2009-09-07 19:52:23.489 emailTest[11711:5b17] [+[AccountsManager _migrateAccountsIfNeeded]] Accounts migration failed
[Switching to process 11711 local thread 0xf03]
私のコードは、私を助けてください、
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc]init];
picker.mailComposeDelegate = self;
[picker setSubject:@"This is iPhone email attachment test"];
UIImage *sampleImg = [UIImage imageNamed:@"iPhone.jpg"];
NSData *imageData = UIImageJPEGRepresentation(sampleImg, 1);
[picker addAttachmentData:imageData mimeType:@"image/png" fileName:@"iPhone.jpg"];
NSString *emailBody = @"I am sending the image attachment with iPhone email service";
[picker setMessageBody:emailBody isHTML:YES];
[self presentModalViewController:picker animated:YES];
[picker release];
です。
具体的には、添付ファイルを作成するためにどのようなコードを実行していますか?メッセージを切り離すには?どのくらい正確に「MessageUIフレームワークを使用していますか? – Tim
コードをご覧ください。 – SST
こんにちは、 あなたのコードはうまくいきましたか? 電子メールの送信ボタンに触れている間も同じメッセージが表示されます。しかし、私はメールに添付ファイルを追加していません。 キャンセルボタンを押したときにメールコントローラを閉じることができませんでした。私はcocos2d層にメールコントローラを追加しています。助けてください。 ありがとうございます。 –