Swift exit().

This commit is contained in:
Matthew Chen 2018-09-27 14:54:29 -04:00
parent 3c22d0b0c8
commit b076f14964
3 changed files with 4 additions and 8 deletions

View File

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

View File

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

View File

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