Swift exit().

pull/1/head
Matthew Chen 7 years ago
parent 3c22d0b0c8
commit b076f14964

@ -240,8 +240,7 @@ static NSTimeInterval launchStartedAt;
[[UIApplication sharedApplication] scheduleLocalNotification:notification]; [[UIApplication sharedApplication] scheduleLocalNotification:notification];
[UIApplication.sharedApplication setApplicationIconBadgeNumber:1]; [UIApplication.sharedApplication setApplicationIconBadgeNumber:1];
[DDLog flushLog]; OWSFail(@"!isDatabasePasswordAccessible.");
exit(0);
} }
} }
@ -339,9 +338,7 @@ static NSTimeInterval launchStartedAt;
style:UIAlertActionStyleDefault style:UIAlertActionStyleDefault
handler:^(UIAlertAction *_Nonnull action) { handler:^(UIAlertAction *_Nonnull action) {
[Pastelog submitLogsWithCompletion:^{ [Pastelog submitLogsWithCompletion:^{
OWSLogInfo(@"exiting after sharing debug logs."); OWSFail(@"exiting after sharing debug logs.");
[DDLog flushLog];
exit(0);
}]; }];
}]]; }]];
UIViewController *fromViewController = [[UIApplication sharedApplication] frontmostViewController]; UIViewController *fromViewController = [[UIApplication sharedApplication] frontmostViewController];

@ -233,7 +233,7 @@ NS_ASSUME_NONNULL_BEGIN
[self clearAllNotifications]; [self clearAllNotifications];
[DebugLogger.sharedLogger wipeLogs]; [DebugLogger.sharedLogger wipeLogs];
exit(0); OWSFail(@"App data reset.");
} }
+ (void)clearAllNotifications + (void)clearAllNotifications

@ -69,8 +69,7 @@ NS_ASSUME_NONNULL_BEGIN
UIAlertAction *quitAction = [UIAlertAction actionWithTitle:@"Quit" UIAlertAction *quitAction = [UIAlertAction actionWithTitle:@"Quit"
style:UIAlertActionStyleDefault style:UIAlertActionStyleDefault
handler:^(UIAlertAction *_Nonnull action) { handler:^(UIAlertAction *_Nonnull action) {
[DDLog flushLog]; OWSFail(@"Obsolete install.");
exit(0);
}]; }];
[alertController addAction:quitAction]; [alertController addAction:quitAction];

Loading…
Cancel
Save