gpt4 book ai didi

iphone - iPhone MFMailComposeViewController 报告错误。安全吗?

转载 作者:行者123 更新时间:2023-12-03 21:12:25 24 4
gpt4 key购买 nike

在尝试使用简单的 KML 附件(仅几个字节)发送邮件时,我在发送过程中在控制台中收到以下警告。这些可以被忽略还是我犯了错误?邮件似乎发送正常


- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error {
// Dismiss the e-mail controller once the user is done
[self dismissModalViewControllerAnimated:YES];
}

- (void) emailLocation: (CLLocation*) loc {
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"imhere" ofType:@"txt"];
NSString * kml=nil ;
NSString * finalkml=nil;
NSData * filedata=nil;

NSString * mime= @"application/vnd.google-earth.kml+xml";

if (filePath) kml = [NSString stringWithContentsOfFile:filePath];
if (kml) finalkml = [NSString stringWithFormat:kml,loc.coordinate.longitude, loc.coordinate.latitude,loc.altitude];
if (finalkml) filedata = [finalkml dataUsingEncoding:NSUTF8StringEncoding];


if (([MFMailComposeViewController canSendMail]) && (filedata))
{
MFMailComposeViewController *mcvc = [[[MFMailComposeViewController alloc] init] autorelease];
mcvc.mailComposeDelegate = self;
[mcvc setSubject:@"I'm here"];
NSString *body = [NSString stringWithFormat:@"at %f %f",loc.coordinate.latitude,loc.coordinate.longitude];
[mcvc setMessageBody:body isHTML:YES];
[mcvc addAttachmentData:filedata mimeType:mime fileName:@"imhere.kml"];
[self presentModalViewController:mcvc animated:YES];
}
else {
UIAlertView * av = [[UIAlertView alloc] initWithTitle:@"No Email" message:@"Unable to send email." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[av show];
[av release];
}
}

我已经从上面的电子邮件正文示例中删除了 HTML,因为它搞乱了 SO 格式,但它是一封基本的 HTML 电子邮件,带有指向 google map 的链接。

控制台中报告的警告是

2010-02-21 14:23:38.809 DataTap[2008:850f] DA|Could not open the lock file at /tmp/DAAccountsLoading.lock. We'll load the accounts anyway, but bad things may happen2010-02-21 14:23:41.420 DataTap[2008:207] DA|Pipe to DADaemon was lost. Search query 2147483647 is returning an error[Switching to thread 13827]2010-02-21 14:23:44.197 DataTap[2008:207] DA|Pipe to DADaemon was lost. Search query 2147483647 is returning an error2010-02-21 14:23:45.357 DataTap[2008:207] DA|Pipe to DADaemon was lost. Search query 2147483647 is returning an error2010-02-21 14:23:45.855 DataTap[2008:207] DA|Pipe to DADaemon was lost. Search query 2147483647 is returning an error2010-02-21 14:23:48.543 DataTap[2008:207] DA|Pipe to DADaemon was lost. Search query 2147483647 is returning an error2010-02-21 14:23:48.848 DataTap[2008:207] DA|Pipe to DADaemon was lost. Search query 2147483647 is returning an error

“坏事可能会发生”——Apple 人类程序员的证据!

我看过这个问题email with audio它报告了我的错误之一。因此,我尝试将附件的 mime 类型更改为 text/xml,这没有什么区别,并完全删除附件,此时错误就消失了。

那么 - 这是否可能导致崩溃,或者安全吗?

最佳答案

我之前见过“无法打开锁定文件”消息,它似乎是良性的。我不知道“pipe to DADaemon”消息,这可能与邮件无关。

关于iphone - iPhone MFMailComposeViewController 报告错误。安全吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2306234/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com