Created
November 9, 2012 07:50
-
-
Save aschuch/4044313 to your computer and use it in GitHub Desktop.
Flurry iOS integration with Backtrace Error Handler
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// Flurry | |
#ifndef DEBUG | |
NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler); | |
[FlurryAnalytics logAllPageViews:navigationController]; | |
[FlurryAnalytics startSession:kFlurryKey]; | |
#endif | |
} | |
#pragma mark - Exceptionhandler | |
void uncaughtExceptionHandler(NSException *exception) | |
{ | |
NSArray *backtrace = [exception callStackSymbols]; | |
NSString *message = [NSString stringWithFormat:@"Backtrace:\n%@", backtrace]; | |
[Flurry logError:@"Uncaught" message:message exception:exception]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment