我的应用程序中的 PLCrashReporter 没有为我提供符号化代码。我正在使用 PLCrashReporter 进行崩溃分析
PLCrashReporter in my app is not getting me symbolicated codes. I am using PLCrashReporter for crash analytics
我正在通过 application_did_finish_launching_with 选项调用 handle_crash_report。还实现了 handle_crash_report。现在我通过邮件发送崩溃日志。
这是我正在使用的代码。
Class mailClass = (NSClassFromString(@"MFMailComposeViewController"));
if (mailClass != nil) {
MFMailComposeViewController *picker1 = [[MFMailComposeViewController alloc] init];
picker1.mailComposeDelegate = self;
picker1.modalPresentationStyle = UIModalPresentationFormSheet;
[picker1 setSubject:@"log files"];
// Set the recipients
NSArray *toRecipients = [NSArray arrayWithObject:@"telekomsrbija.android@gmail.com"];
[picker1 setToRecipients:toRecipients];
//First File
NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
NSString *fileName = [documentsDirectory stringByAppendingPathComponent:@"debug_log.txt"];
NSData *myNoteData = [NSData dataWithContentsOfFile:fileName];
if ([myNoteData length])
[picker1 addAttachmentData:myNoteData mimeType:@"text/plain" fileName:@"debug_log.txt"];
然后我正在检查 CrashHelper 是否有 crashReportPending。它有这个代码。
if ([CrashHelper hasCrashReportPending]) {
NSData* crashData = [NSData dataWithContentsOfFile:[CrashHelper sharedCrashHelper].getCrashPath];
[picker1 addAttachmentData:crashData mimeType:@"text/plain" fileName:@"LastCrashReports.txt"];
}
NSString *emailBody = @"I am attaching my file!";
[picker1 setMessageBody:emailBody isHTML:NO];
if([mailClass canSendMail]) {
[self.navigationController presentViewController:picker1 animated:YES completion:nil];
}
}
我收到了邮件,但没有收到符号代码。我附上快照。
无法直接从设备获取包含 class 名称、方法名称、文件名和行号的完全符号化的崩溃报告。您需要在服务器或您的 Mac.
上使用 OS 以及应用程序和框架符号对崩溃报告进行符号化
有很多问题和答案已经详细描述了这个过程。例如this one
我正在通过 application_did_finish_launching_with 选项调用 handle_crash_report。还实现了 handle_crash_report。现在我通过邮件发送崩溃日志。 这是我正在使用的代码。
Class mailClass = (NSClassFromString(@"MFMailComposeViewController"));
if (mailClass != nil) {
MFMailComposeViewController *picker1 = [[MFMailComposeViewController alloc] init];
picker1.mailComposeDelegate = self;
picker1.modalPresentationStyle = UIModalPresentationFormSheet;
[picker1 setSubject:@"log files"];
// Set the recipients
NSArray *toRecipients = [NSArray arrayWithObject:@"telekomsrbija.android@gmail.com"];
[picker1 setToRecipients:toRecipients];
//First File
NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
NSString *fileName = [documentsDirectory stringByAppendingPathComponent:@"debug_log.txt"];
NSData *myNoteData = [NSData dataWithContentsOfFile:fileName];
if ([myNoteData length])
[picker1 addAttachmentData:myNoteData mimeType:@"text/plain" fileName:@"debug_log.txt"];
然后我正在检查 CrashHelper 是否有 crashReportPending。它有这个代码。
if ([CrashHelper hasCrashReportPending]) {
NSData* crashData = [NSData dataWithContentsOfFile:[CrashHelper sharedCrashHelper].getCrashPath];
[picker1 addAttachmentData:crashData mimeType:@"text/plain" fileName:@"LastCrashReports.txt"];
}
NSString *emailBody = @"I am attaching my file!";
[picker1 setMessageBody:emailBody isHTML:NO];
if([mailClass canSendMail]) {
[self.navigationController presentViewController:picker1 animated:YES completion:nil];
}
}
我收到了邮件,但没有收到符号代码。我附上快照。
无法直接从设备获取包含 class 名称、方法名称、文件名和行号的完全符号化的崩溃报告。您需要在服务器或您的 Mac.
上使用 OS 以及应用程序和框架符号对崩溃报告进行符号化有很多问题和答案已经详细描述了这个过程。例如this one