Skip to content

Instantly share code, notes, and snippets.

@mjt0704
Created March 19, 2014 09:22
Show Gist options
  • Save mjt0704/9638301 to your computer and use it in GitHub Desktop.
Save mjt0704/9638301 to your computer and use it in GitHub Desktop.
about BSCrashNotifier
//BSCrashNotifier is a bundle that allows you to be notified when your app is crashing.
NSBundle* bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"BSCrashNotifier" ofType:@"bundle"]];
Class crashNotifierClass = [bundle principalClass];
if (crashNotifierClass)
{
[crashNotifierClass onCrashSend:@selector(weCrashed:) to:self];
}
else
{
NSLog(@"couldn't load bundle");
}
//and implement the notification method like:
- (void)weCrashed:(int)signalNumber
{
NSLog(@"we crashed: %i",signalNumber);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment