mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-04 10:30:42 +00:00
Improves sample code for last commit
This commit is contained in:
parent
e624fb71ab
commit
285dabf347
@ -39,8 +39,7 @@ Example
|
|||||||
|
|
||||||
[[BITHockeyManager sharedHockeyManager] startManager];
|
[[BITHockeyManager sharedHockeyManager] startManager];
|
||||||
|
|
||||||
if ([[BITHockeyManager.crashmanager] didCrashInLastSession] &&
|
if ([self didCrashInLastSessionOnStartup]) {
|
||||||
[[BITHockeyManager.crashmanager] timeintervalCrashInLastSessionOccured] < 5) {
|
|
||||||
// show intermediate UI
|
// show intermediate UI
|
||||||
} else {
|
} else {
|
||||||
[self setupApplication];
|
[self setupApplication];
|
||||||
@ -49,6 +48,11 @@ Example
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)didCrashInLastSessionOnStartup {
|
||||||
|
return ([[BITHockeyManager.crashmanager] didCrashInLastSession] &&
|
||||||
|
[[BITHockeyManager.crashmanager] timeintervalCrashInLastSessionOccured] < 5);
|
||||||
|
}
|
||||||
|
|
||||||
- (void)setupApplication {
|
- (void)setupApplication {
|
||||||
// setup your app specific code
|
// setup your app specific code
|
||||||
}
|
}
|
||||||
@ -56,11 +60,15 @@ Example
|
|||||||
#pragma mark - BITCrashManagerDelegate
|
#pragma mark - BITCrashManagerDelegate
|
||||||
|
|
||||||
- (void)crashManager:(BITCrashManager *)crashManager didFailWithError:(NSError *)error {
|
- (void)crashManager:(BITCrashManager *)crashManager didFailWithError:(NSError *)error {
|
||||||
[self setupApplication];
|
if ([self didCrashInLastSessionOnStartup) {
|
||||||
|
[self setupApplication];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)crashManagerDidFinishSendingCrashReport:(BITCrashManager *)crashManager {
|
- (void)crashManagerDidFinishSendingCrashReport:(BITCrashManager *)crashManager {
|
||||||
[self setupApplication];
|
if ([self didCrashInLastSessionOnStartup) {
|
||||||
|
[self setupApplication];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user