捕获系统异常崩溃的方法
1、使用PLCrashReporter框架 PLCrashReporterConfig *config = [[PLCrashReporterConfig alloc] initWithSignalHandlerType:PLCrashReporterSignalHandlerTypeMach symbolicationStrategy:PLCrashReporterSymbolicationStrategyAll]; PLCrashReporter *reporter = [[PLCrashReporter alloc] initWithConfiguration:config]; NSData *data = [reporter generateLiveReport]; PLCrashReport *report = [[PLCrashReport alloc] initWithData:data error:nil]; NSString *reportStr = [PLCrashReportTextFormatter stringValueForCrashReport:report withTextFormat:PLCrashReportTextFormatiOS]; NSLog(@"%@", reportStr); 2