*
*
*
* - (void) handleCrashReport {
* NSData *crashData;
* NSError *error;
*
*
* crashData = [crashReporter loadPendingCrashReportDataAndReturnError: &error];
* if (crashData == nil) {
* NSLog(@"Could not load crash report: %@", error);
* goto finish;
* }
*
*
*
* if (report == nil) {
* NSLog(@"Could not parse crash report");
* goto finish;
* }
*
* NSLog(
@"Crashed with signal %@ (code %@, address=0x%" PRIx64
")", report.
signalInfo.
name,
*
*
* finish:
* [crashReporter purgePendingCrashReport];
* return;
* }
*
*
* - (void) applicationDidFinishLaunching: (UIApplication *) application {
* NSError *error;
*
*
* if ([crashReporter hasPendingCrashReport])
* [self handleCrashReport];
*
* if (![crashReporter enableCrashReporterAndReturnError: &error])
* NSLog(@"Warning: Could not enable crash reporter: %@", error);
*
* }
*