diff --git a/PsyPad.xcodeproj/project.pbxproj b/PsyPad.xcodeproj/project.pbxproj index 8f8ebbc..cc5a496 100644 --- a/PsyPad.xcodeproj/project.pbxproj +++ b/PsyPad.xcodeproj/project.pbxproj @@ -83,9 +83,6 @@ 635D07B6168D7D0D002B845F /* MainMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 635D07B5168D7D0D002B845F /* MainMenuViewController.m */; }; 636035BA168D897000AE93D0 /* UIView+Positioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 636035B8168D897000AE93D0 /* UIView+Positioning.m */; }; 636035BF168D897E00AE93D0 /* Random.m in Sources */ = {isa = PBXBuildFile; fileRef = 636035BE168D897E00AE93D0 /* Random.m */; }; - 63606108168DC82900F200CA /* RIButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 63606102168DC82900F200CA /* RIButtonItem.m */; }; - 63606109168DC82900F200CA /* UIActionSheet+Blocks.m in Sources */ = {isa = PBXBuildFile; fileRef = 63606104168DC82900F200CA /* UIActionSheet+Blocks.m */; }; - 6360610A168DC82900F200CA /* UIAlertView+Blocks.m in Sources */ = {isa = PBXBuildFile; fileRef = 63606106168DC82900F200CA /* UIAlertView+Blocks.m */; }; 6374D3B31ADF8901003A3AAF /* AvailableConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 6374D3B21ADF8901003A3AAF /* AvailableConfiguration.m */; }; 6374D3B61ADF8999003A3AAF /* DemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6374D3B51ADF8999003A3AAF /* DemoViewController.m */; }; 6385E38A18176BB300508530 /* BorderButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 6385E38918176BB300508530 /* BorderButton.m */; }; @@ -238,13 +235,6 @@ 636035BD168D897E00AE93D0 /* Random.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Random.h; sourceTree = ""; }; 636035BE168D897E00AE93D0 /* Random.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Random.m; sourceTree = ""; }; 636035C0168D898600AE93D0 /* NSObject+DelayBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+DelayBlock.h"; sourceTree = ""; }; - 63606100168DC82900F200CA /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.md; path = "../UIAlertView-Blocks/README.md"; sourceTree = ""; }; - 63606101168DC82900F200CA /* RIButtonItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RIButtonItem.h; path = "../UIAlertView-Blocks/RIButtonItem.h"; sourceTree = ""; }; - 63606102168DC82900F200CA /* RIButtonItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RIButtonItem.m; path = "../UIAlertView-Blocks/RIButtonItem.m"; sourceTree = ""; }; - 63606103168DC82900F200CA /* UIActionSheet+Blocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIActionSheet+Blocks.h"; path = "../UIAlertView-Blocks/UIActionSheet+Blocks.h"; sourceTree = ""; }; - 63606104168DC82900F200CA /* UIActionSheet+Blocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIActionSheet+Blocks.m"; path = "../UIAlertView-Blocks/UIActionSheet+Blocks.m"; sourceTree = ""; }; - 63606105168DC82900F200CA /* UIAlertView+Blocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIAlertView+Blocks.h"; path = "../UIAlertView-Blocks/UIAlertView+Blocks.h"; sourceTree = ""; }; - 63606106168DC82900F200CA /* UIAlertView+Blocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIAlertView+Blocks.m"; path = "../UIAlertView-Blocks/UIAlertView+Blocks.m"; sourceTree = ""; }; 6374D3B11ADF8900003A3AAF /* AvailableConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AvailableConfiguration.h; sourceTree = ""; }; 6374D3B21ADF8901003A3AAF /* AvailableConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AvailableConfiguration.m; sourceTree = ""; }; 6374D3B41ADF8999003A3AAF /* DemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoViewController.h; sourceTree = ""; }; @@ -504,7 +494,6 @@ 5AF0E9EE0391685FE8B56CF2 /* Helper Classes */ = { isa = PBXGroup; children = ( - 636060FF168DC82900F200CA /* UIAlertView-Blocks */, 636035BE168D897E00AE93D0 /* Random.m */, 636035B9168D897000AE93D0 /* UIView+Positioning.h */, 63F9F1B8168ED165006532D9 /* UIButtonBlock.h */, @@ -669,20 +658,6 @@ path = PsyPad; sourceTree = ""; }; - 636060FF168DC82900F200CA /* UIAlertView-Blocks */ = { - isa = PBXGroup; - children = ( - 63606100168DC82900F200CA /* README.md */, - 63606101168DC82900F200CA /* RIButtonItem.h */, - 63606102168DC82900F200CA /* RIButtonItem.m */, - 63606103168DC82900F200CA /* UIActionSheet+Blocks.h */, - 63606104168DC82900F200CA /* UIActionSheet+Blocks.m */, - 63606105168DC82900F200CA /* UIAlertView+Blocks.h */, - 63606106168DC82900F200CA /* UIAlertView+Blocks.m */, - ); - path = "UIAlertView-Blocks"; - sourceTree = ""; - }; 63A1ED5D17B89BEF0089C204 /* Custom Controls */ = { isa = PBXGroup; children = ( @@ -877,12 +852,9 @@ 636035BA168D897000AE93D0 /* UIView+Positioning.m in Sources */, 636035BF168D897E00AE93D0 /* Random.m in Sources */, 190C043A24A9B51F00B0521B /* DLCenteringScrollViewController.m in Sources */, - 63606108168DC82900F200CA /* RIButtonItem.m in Sources */, 6330F4D61A93299500A62986 /* DatabaseManager.m in Sources */, - 63606109168DC82900F200CA /* UIActionSheet+Blocks.m in Sources */, 190C043924A9B51F00B0521B /* UIViewController+DLLoad.m in Sources */, 63B0E8D41ADF7E9000316695 /* ConfigurationTableViewCell.m in Sources */, - 6360610A168DC82900F200CA /* UIAlertView+Blocks.m in Sources */, 63BF7A831ABEB2D300825F70 /* _TestSequence.m in Sources */, 63F9F1BA168ED165006532D9 /* UIButton+Block.m in Sources */, 190C043724A9B51F00B0521B /* DLLandscapeNavigationController.m in Sources */, @@ -1007,7 +979,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -1024,6 +996,7 @@ /usr/include/libxml2, ); INFOPLIST_FILE = "PsyPad/Supporting Files/PsyPad-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 2.6; OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = PsyPad; @@ -1139,7 +1112,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = VLDWUKP35J; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -1156,6 +1129,7 @@ /usr/include/libxml2, ); INFOPLIST_FILE = "PsyPad/Supporting Files/PsyPad-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 2.6; OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = PsyPad; @@ -1177,7 +1151,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = VLDWUKP35J; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -1194,6 +1168,7 @@ /usr/include/libxml2, ); INFOPLIST_FILE = "PsyPad/Supporting Files/PsyPad-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 2.6; OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = PsyPad; diff --git a/PsyPad.xcodeproj/xcuserdata/aturpin.xcuserdatad/xcschemes/xcschememanagement.plist b/PsyPad.xcodeproj/xcuserdata/aturpin.xcuserdatad/xcschemes/xcschememanagement.plist index 8071650..b6e7661 100644 --- a/PsyPad.xcodeproj/xcuserdata/aturpin.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/PsyPad.xcodeproj/xcuserdata/aturpin.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,12 +7,12 @@ Mogenerator.xcscheme_^#shared#^_ orderHint - 6 + 7 PsyPad.xcscheme_^#shared#^_ orderHint - 7 + 6 diff --git a/PsyPad/Admin Panel/AdminPanelTableViewController.m b/PsyPad/Admin Panel/AdminPanelTableViewController.m index 63b2ba7..0a9365c 100755 --- a/PsyPad/Admin Panel/AdminPanelTableViewController.m +++ b/PsyPad/Admin Panel/AdminPanelTableViewController.m @@ -12,8 +12,6 @@ #import "User.h" #import "AppDelegate.h" -#import "RIButtonItem.h" -#import "UIAlertView+Blocks.h" #import "ManageUserTableViewController.h" #import "TestLogItem.h" #import "TestLog.h" @@ -226,9 +224,10 @@ - (void)loadServerParticipants [self.hud removeFromSuperview]; UIAlertController * alert = [UIAlertController - alertControllerWithTitle:@"Failed to Load Participants" - message:error + alertControllerWithTitle:@"Failed to Load Participants" + message:error preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; }]; @@ -251,12 +250,12 @@ - (void)downloadParticipant:(NSString *)username { if (![self.users containsObject:newUser]) [self.users addObject:newUser]; - + UIAlertController * alert = [UIAlertController alertControllerWithTitle:@"" message:@"User downloaded successfully." preferredStyle:UIAlertControllerStyleAlert]; - + [alert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; [self.tableView reloadData]; @@ -272,7 +271,7 @@ - (void)downloadParticipant:(NSString *)username alertControllerWithTitle:@"Failed to Download Participant" message:error preferredStyle:UIAlertControllerStyleAlert]; - + [alert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; }]; } @@ -299,7 +298,7 @@ - (void)uploadLogs alertControllerWithTitle:@"" message:[NSString stringWithFormat:@"Logs successfully uploaded"] preferredStyle:UIAlertControllerStyleAlert]; - + [alert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; } failure:^(NSString *error) @@ -311,7 +310,7 @@ - (void)uploadLogs alertControllerWithTitle:@"Failed to Upload Logs" message:error preferredStyle:UIAlertControllerStyleAlert]; - + [alert addAction:[UIAlertAction actionWithTitle:@"Close" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; }]; } @@ -342,6 +341,7 @@ - (void)downloadAllParticipants alertControllerWithTitle:@"" message:[NSString stringWithFormat:@"%lu participants downloaded", (unsigned long)newUsers.count] preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; } failure:^(NSString *error) { @@ -352,6 +352,7 @@ - (void)downloadAllParticipants alertControllerWithTitle:@"Failed to Upload Logs" message:error preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"Close" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; }]; } @@ -360,9 +361,10 @@ - (void)logout { __weak typeof(self) weakSelf = self; - RIButtonItem *logOut = [RIButtonItem itemWithLabel:@"Log Out"]; - logOut.action = ^ - { + UIAlertAction* logOut = [UIAlertAction + actionWithTitle:@"Yes, please"@"Log Out" + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { [[ServerManager sharedManager] logout]; UINavigationController *nav = (UINavigationController *)weakSelf.navigationController.presentingViewController; @@ -372,12 +374,13 @@ - (void)logout { [nav popViewControllerAnimated:YES]; }]; - }; + }]; UIAlertController * alert = [UIAlertController alertControllerWithTitle:@"" message:@"Are you sure you want to\nlog out of PsyPad?" preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:logOut]; [alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; } @@ -486,7 +489,7 @@ - (IBAction)demoModeToggled:(UISwitch *)sender alertControllerWithTitle:@"Warning" message:message preferredStyle:UIAlertControllerStyleAlert]; - + [alert addAction:[UIAlertAction actionWithTitle:@"Close" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; } diff --git a/PsyPad/Database/Models/TestConfiguration.m b/PsyPad/Database/Models/TestConfiguration.m index 57ac876..ddd4b5f 100644 --- a/PsyPad/Database/Models/TestConfiguration.m +++ b/PsyPad/Database/Models/TestConfiguration.m @@ -437,7 +437,7 @@ - (void)installSequence:(NSURL *)sequenceURL name:(NSString *)name data:(NSDicti if (self.sequence) { [self.sequence MR_deleteEntity]; - self.sequence = nil; + //self.sequence = nil; } self.sequence = newSequence; diff --git a/PsyPad/Main Menu/MainMenuViewController.m b/PsyPad/Main Menu/MainMenuViewController.m index 50e54ec..655a088 100755 --- a/PsyPad/Main Menu/MainMenuViewController.m +++ b/PsyPad/Main Menu/MainMenuViewController.m @@ -11,7 +11,6 @@ #import #import "UIView+Positioning.h" -#import "UIAlertView+Blocks.h" #import "AppDelegate.h" #import "User.h" #import "TestConfiguration.h" diff --git a/PsyPad/New/ConfigurationsTableViewController.m b/PsyPad/New/ConfigurationsTableViewController.m index dacbb5d..fe5d66a 100644 --- a/PsyPad/New/ConfigurationsTableViewController.m +++ b/PsyPad/New/ConfigurationsTableViewController.m @@ -12,7 +12,6 @@ #import "ServerManager.h" #import "ConfigurationTableViewCell.h" #import "AvailableConfiguration.h" -#import "UIAlertView+Blocks.h" #import "DatabaseManager.h" enum { diff --git a/PsyPad/New/LoginViewController.m b/PsyPad/New/LoginViewController.m index 9869a79..b8360a5 100644 --- a/PsyPad/New/LoginViewController.m +++ b/PsyPad/New/LoginViewController.m @@ -73,10 +73,9 @@ - (IBAction)login UIAlertController * alert = [UIAlertController alertControllerWithTitle:@"Invalid Email" message:@"The email address you entered is invalid." preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"Close" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; - // delegate:nil - // cancelButtonTitle:@"Close" - // otherButtonTitles:nil] show]; + return; } @@ -85,6 +84,7 @@ - (IBAction)login UIAlertController * alert = [UIAlertController alertControllerWithTitle:@"Misisng Password" message:@"Please enter your password to log in." preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"Close" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; return; @@ -105,6 +105,7 @@ - (IBAction)login UIAlertController * alert = [UIAlertController alertControllerWithTitle:@"Log In Failed" message:error preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"Close" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; [hud hideAnimated:YES]; diff --git a/PsyPad/New/SignUpTableViewController.m b/PsyPad/New/SignUpTableViewController.m index f6f389f..1f28161 100644 --- a/PsyPad/New/SignUpTableViewController.m +++ b/PsyPad/New/SignUpTableViewController.m @@ -73,6 +73,7 @@ - (void)signUp alertControllerWithTitle:@"Password Mismatch" message:@"The two passwords you entered do not match." preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"Close" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; return; } @@ -83,6 +84,7 @@ - (void)signUp alertControllerWithTitle:@"Invalid Email" message:@"Invalid Email." preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"Close" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; return; } @@ -92,6 +94,7 @@ - (void)signUp UIAlertController * alert = [UIAlertController alertControllerWithTitle:@"Misisng Password" message:@"Please choose a password to sign up with." preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; return; } @@ -102,6 +105,7 @@ - (void)signUp alertControllerWithTitle:@"Misisng Affiliation" message:@"Please enter your academic affiliation (or \"None\")." preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; return; @@ -131,6 +135,7 @@ - (void)signUp alertControllerWithTitle:@"Sign Up Failed" message:error preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"Close" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:alert animated:YES completion:nil]; [hud hideAnimated:YES];