Improves sample code for last commit

This commit is contained in:
Andreas Linde 2012-08-04 16:30:44 +02:00
parent e624fb71ab
commit 285dabf347

View File

@ -39,8 +39,7 @@ Example
[[BITHockeyManager sharedHockeyManager] startManager];
if ([[BITHockeyManager.crashmanager] didCrashInLastSession] &&
[[BITHockeyManager.crashmanager] timeintervalCrashInLastSessionOccured] < 5) {
if ([self didCrashInLastSessionOnStartup]) {
// show intermediate UI
} else {
[self setupApplication];
@ -49,6 +48,11 @@ Example
return YES;
}
- (BOOL)didCrashInLastSessionOnStartup {
return ([[BITHockeyManager.crashmanager] didCrashInLastSession] &&
[[BITHockeyManager.crashmanager] timeintervalCrashInLastSessionOccured] < 5);
}
- (void)setupApplication {
// setup your app specific code
}
@ -56,12 +60,16 @@ Example
#pragma mark - BITCrashManagerDelegate
- (void)crashManager:(BITCrashManager *)crashManager didFailWithError:(NSError *)error {
if ([self didCrashInLastSessionOnStartup) {
[self setupApplication];
}
}
- (void)crashManagerDidFinishSendingCrashReport:(BITCrashManager *)crashManager {
if ([self didCrashInLastSessionOnStartup) {
[self setupApplication];
}
}
@end