Created
March 19, 2014 09:22
-
-
Save mjt0704/9638301 to your computer and use it in GitHub Desktop.
about BSCrashNotifier
This file contains 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
//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