标签:
在AppDelegate,定义方法
void catchExceptionHandler(NSException *exception) {
NSLog(@"CRASH: %@", exception);
NSLog(@"Stack Trace: %@", [exception callStackSymbols]);
}
在- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
调用
NSSetUncaughtExceptionHandler(&catchExceptionHandler);
方法
标签:
原文地址:http://www.cnblogs.com/Xujg/p/5670296.html