0
你们谁都知道我怎么能从iOS应用程序记录任何崩溃异常?iOS:记录任何崩溃异常
我逼崩溃在我的viewController:
- (void)viewDidLoad {
[super viewDidLoad];
NSArray *myArray = [NSArray new];
NSLog(@"%@", [myArray objectAtIndex:0]);
}
,我试图捕捉在控制台中坠毁在我的AppDelegate:
void uncaughtExceptionHandler(NSException *exception) {
NSLog(@"CRASH: %@", exception);
NSLog(@"Stack Trace: %@", [exception callStackSymbols]);
}
void SignalHandler(int sig) {
NSLog(@"CRASH: %d",sig);
}
但这并没有工作。你们谁都知道如何在iOS中注册任何崩溃的异常?
我实现NSSetUncaughtExceptionHandler(&的UncaughtExceptionHandler);和工作。但如何记录输出日志? – user2924482