Xcode MFMailComposeViewController在ipad中使用时退出,并在模拟器中正常工作

Xcode MFMailComposeViewController在ipad中使用时退出,并在模拟器中正常工作,xcode,Xcode,我正在使用此代码并提供设置以检查邮件帐户是否已设置。但是当它到达NSArray*toRecipients=[NSArray arrayWithObject:@]feedback@xyz"]; 它会被中止。我的代码如下消息ui.framework也很好地提供了 MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; controller.mailComposeDelegate = s

我正在使用此代码并提供设置以检查邮件帐户是否已设置。但是当它到达
NSArray*toRecipients=[NSArray arrayWithObject:@]feedback@xyz"];
它会被中止。我的代码如下<代码>消息ui.framework
也很好地提供了

MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
controller.mailComposeDelegate = self;
[controller setSubject:@"heading"];
[controller setMessageBody:@"some text" isHTML:NO];
NSArray *toRecipients = [NSArray arrayWithObject: @"feedback@xyz"]; 
[controller setToRecipients:toRecipients];
[self presentModalViewController:controller animated:YES];
[controller release];

收件人电子邮件地址无效。这就是问题发生的原因。使用以下命令:

@"feedback@gmail.com"

注释此行并重试[controller setToRecipients:toRecipients];如果有,请告诉我doubts@Hitman当前位置是的,那么它工作得很好。请看答案。我在评论那些行时已经详细解释了它的工作原理。。否则从那一点上就要流产了。我没有启动它,所以我不知道它是否工作abc@gmail.com像这样你明白了吗?我已经检查过了。它对我很有效