From 6db1a5aeeefab8a08bf4fc1b14c9c5e85ffa9920 Mon Sep 17 00:00:00 2001 From: Micah Gomez Date: Tue, 28 May 2019 14:29:05 -0600 Subject: [PATCH] Update ViewController.m --- FlashBack/ViewController.m | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/FlashBack/ViewController.m b/FlashBack/ViewController.m index 4c5ce02..6c61f17 100644 --- a/FlashBack/ViewController.m +++ b/FlashBack/ViewController.m @@ -323,35 +323,24 @@ int itFuckingCounts = 0; handler:^(UIAlertAction * action) { - //RUN RESTORE SCRIPT + UIAlertController * packageBackupWait= [UIAlertController + alertControllerWithTitle:@"Backup DEB" + message:@"The backup is being created. Please Wait. This dialogue will will be dismissed when finished. The DEB can be found in [/User/Documents/FlashBackDEBs]" + preferredStyle:UIAlertControllerStyleAlert]; [packageBackupAlert dismissViewControllerAnimated:YES completion:nil]; + [self presentViewController:packageBackupWait animated:YES completion:nil]; + + NSTask *packageTask = [[NSTask alloc] init]; [packageTask setLaunchPath:@"/bin/bash"]; [packageTask setArguments:@[ @"FBPackage", backupNameSelected]]; [packageTask launch]; [packageTask waitUntilExit]; - UIAlertController * finishedPackageAlert= [UIAlertController - alertControllerWithTitle:@"Packaging Complete" - message:@"The package can be found in [/User/Documents/FlashBackDEBs/]." - preferredStyle:UIAlertControllerStyleAlert]; - - - UIAlertAction* ok = [UIAlertAction - actionWithTitle:@"ok" - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) - { - [finishedPackageAlert dismissViewControllerAnimated:YES completion:nil]; - - }]; - - [finishedPackageAlert addAction:ok]; - - [self presentViewController:finishedPackageAlert animated:YES completion:nil]; + [packageBackupWait dismissViewControllerAnimated:YES completion:nil]; }]; UIAlertAction* cancel = [UIAlertAction