KSCrash
KSCrash copied to clipboard
Get Reports in Apple Format
In iOS, we can get all crash reports which is in Library/Cache ... But that is saved in JSON format. Is there any way to get reports in Apple format or save it in Apple format. I am not using any Installation classes. I am just uploading those reports to our own server.
Take a look at KSCrashReportFilterAppleFmt
@yvasileuski: Yeah I just searched it. There toAppleFmt function helped me. But that is private function. I made it as public function. Thank you. If you know any better solution pls comment.
You should use filters to decode reports, e.g. id<KSCrashReportFilter> filter = [KSCrashReportFilterAppleFmt filterWithReportStyle:KSAppleReportStyleSymbolicatedSideBySide];
KSCrashReportStore *crashReportStore = [[KSCrash sharedInstance] crashReportStore];
NSDictionary *reportWithID = [crashReportStore reportWithID:self.reportID];
NSArray *reports = @[reportWithID];
[filter filterReports:reports
onCompletion:^(NSArray *filteredReports, BOOL completed, NSError *error) {...}
I assume this formats the JSON files to Apple format? I am not currently seeing any difference with the above code.
Worked like a charm Thanks @yvasileuski