Ios 发送电子邮件导致-连接中断
基本上,我想做的是发送电子邮件:Ios 发送电子邮件导致-连接中断,ios,objective-c,xcode,ios8,mfmailcomposeviewcontroller,Ios,Objective C,Xcode,Ios8,Mfmailcomposeviewcontroller,基本上,我想做的是发送电子邮件: -(void) sendAnEmail { if ([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init]; mail.mailComposeDelegate = self; [mail setSubject
-(void) sendAnEmail {
if ([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init];
mail.mailComposeDelegate = self;
[mail setSubject:@"Subject"];
[mail setMessageBody:@"Hey, check this out!" isHTML:NO];
[mail setToRecipients:@[@"testing@gmail.com"]];
[self presentViewController:mail animated:YES completion:NULL];
}
else
{
NSLog(@"device cannot send email");
}
}
没有错误,没有警告。如果该空区为:
收到消息的BSXPCMessage错误:连接中断
我如何解决这个问题?
试验装置-5S(8.3)
MFMailComposeViewController
上。如果您正在使用以下选项创建CIContext
:尝试将
否
替换为是
这段代码是否真的被调用了?您是否在附近的某个地方对CIFilter进行了任何操作?我正试图发送一封带有附件的电子邮件,出现了相同的问题,因此我尝试了一些简单的方法,这是实际情况code@alexburtnikwtf非常感谢你的提示-你太棒了:D你能在回答中解释为什么会发生这种情况吗?我会把它标记为正确的
[CIContext contextWithOptions: @{kCIContextUseSoftwareRenderer : @(NO)}];