Skip to content

Instantly share code, notes, and snippets.

@aschuch
Created November 9, 2012 07:50
Show Gist options
  • Save aschuch/4044313 to your computer and use it in GitHub Desktop.
Save aschuch/4044313 to your computer and use it in GitHub Desktop.
Flurry iOS integration with Backtrace Error Handler
- (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