0

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

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

Kumar Utsav
  • 2,761
  • 4
  • 24
  • 38
  • i would like to recommend HockeySDK for the crash analytics which you can get it from https://github.com/bitstadium/HockeySDK-iOS. – Piyush Dec 28 '15 at 06:13
  • The size of the app has a constraint by our manager. PLCrashReporter has the smallest size of 500 kb. in all the crash-analytics sdk. So I have to go with this and find the solution. – Kumar Utsav Dec 28 '15 at 06:16

1 Answers1

1

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

Community
  • 1
  • 1
Kerni
  • 15,241
  • 5
  • 36
  • 57