Kumar Utsav
Kumar Utsav

Reputation: 2841

PLCrashReporter in my app is not getting me symbolicated codes. I am using PLCrashReporter for crash analytics

I am calling handle_crash_report from application_did_finish_launching_with options. Also implemented handle_crash_report. And now I am sending the crash logs via mail. Here are the codes I am using.

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:@"[email protected]"];
                        [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"];

and then I am checking whether CrashHelper has crashReportPending. which has got this code.

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];
                        }
                    }

I am getting the mail but not symbolicated code. I am attaching the snapshot.snapshot of the crash mail image

Upvotes: 0

Views: 124

Answers (1)

Kerni
Kerni

Reputation: 15339

It is not possible to get fully symbolicated crash reports that include class names, method names, file names and line numbers directly from the device. You need to symbolicated the crash reports with the OS and app and framework symbols on a server or your Mac.

There are plenty of questions and answers that already describe this process in detail. For example this one

Upvotes: 1

Related Questions