Created
October 31, 2012 20:12
-
-
Save grantland/3989521 to your computer and use it in GitHub Desktop.
Printing stack traces in iOS 5+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// source: http://stackoverflow.com/questions/7841610/xcode-4-2-debug-doesnt-symbolicate-stack-call | |
void uncaughtExceptionHandler(NSException *exception) { | |
NSLog(@"CRASH: %@", exception); | |
NSLog(@"Stack Trace: %@", [exception callStackSymbols]); | |
// Internal error reporting | |
} | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler); | |
// Normal launch stuff | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment