Skip to content

Commit

Permalink
Before trying ios14
Browse files Browse the repository at this point in the history
  • Loading branch information
turpinandrew committed Oct 13, 2020
1 parent 563112c commit b02735b
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 53 deletions.
37 changes: 6 additions & 31 deletions PsyPad.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -238,13 +235,6 @@
636035BD168D897E00AE93D0 /* Random.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Random.h; sourceTree = "<group>"; };
636035BE168D897E00AE93D0 /* Random.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Random.m; sourceTree = "<group>"; };
636035C0168D898600AE93D0 /* NSObject+DelayBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+DelayBlock.h"; sourceTree = "<group>"; };
63606100168DC82900F200CA /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.md; path = "../UIAlertView-Blocks/README.md"; sourceTree = "<group>"; };
63606101168DC82900F200CA /* RIButtonItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RIButtonItem.h; path = "../UIAlertView-Blocks/RIButtonItem.h"; sourceTree = "<group>"; };
63606102168DC82900F200CA /* RIButtonItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RIButtonItem.m; path = "../UIAlertView-Blocks/RIButtonItem.m"; sourceTree = "<group>"; };
63606103168DC82900F200CA /* UIActionSheet+Blocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIActionSheet+Blocks.h"; path = "../UIAlertView-Blocks/UIActionSheet+Blocks.h"; sourceTree = "<group>"; };
63606104168DC82900F200CA /* UIActionSheet+Blocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIActionSheet+Blocks.m"; path = "../UIAlertView-Blocks/UIActionSheet+Blocks.m"; sourceTree = "<group>"; };
63606105168DC82900F200CA /* UIAlertView+Blocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIAlertView+Blocks.h"; path = "../UIAlertView-Blocks/UIAlertView+Blocks.h"; sourceTree = "<group>"; };
63606106168DC82900F200CA /* UIAlertView+Blocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIAlertView+Blocks.m"; path = "../UIAlertView-Blocks/UIAlertView+Blocks.m"; sourceTree = "<group>"; };
6374D3B11ADF8900003A3AAF /* AvailableConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AvailableConfiguration.h; sourceTree = "<group>"; };
6374D3B21ADF8901003A3AAF /* AvailableConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AvailableConfiguration.m; sourceTree = "<group>"; };
6374D3B41ADF8999003A3AAF /* DemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoViewController.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -504,7 +494,6 @@
5AF0E9EE0391685FE8B56CF2 /* Helper Classes */ = {
isa = PBXGroup;
children = (
636060FF168DC82900F200CA /* UIAlertView-Blocks */,
636035BE168D897E00AE93D0 /* Random.m */,
636035B9168D897000AE93D0 /* UIView+Positioning.h */,
63F9F1B8168ED165006532D9 /* UIButtonBlock.h */,
Expand Down Expand Up @@ -669,20 +658,6 @@
path = PsyPad;
sourceTree = "<group>";
};
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 = "<group>";
};
63A1ED5D17B89BEF0089C204 /* Custom Controls */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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)",
Expand All @@ -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;
Expand Down Expand Up @@ -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)",
Expand All @@ -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;
Expand All @@ -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)",
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<key>Mogenerator.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>6</integer>
<integer>7</integer>
</dict>
<key>PsyPad.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>7</integer>
<integer>6</integer>
</dict>
</dict>
</dict>
Expand Down
31 changes: 17 additions & 14 deletions PsyPad/Admin Panel/AdminPanelTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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];
}];

Expand All @@ -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];
Expand All @@ -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];
}];
}
Expand All @@ -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)
Expand All @@ -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];
}];
}
Expand Down Expand Up @@ -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)
{
Expand All @@ -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];
}];
}
Expand All @@ -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;
Expand All @@ -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];
}
Expand Down Expand Up @@ -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];
}

Expand Down
2 changes: 1 addition & 1 deletion PsyPad/Database/Models/TestConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion PsyPad/Main Menu/MainMenuViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#import <AFNetworking/AFNetworking.h>

#import "UIView+Positioning.h"
#import "UIAlertView+Blocks.h"
#import "AppDelegate.h"
#import "User.h"
#import "TestConfiguration.h"
Expand Down
1 change: 0 additions & 1 deletion PsyPad/New/ConfigurationsTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#import "ServerManager.h"
#import "ConfigurationTableViewCell.h"
#import "AvailableConfiguration.h"
#import "UIAlertView+Blocks.h"
#import "DatabaseManager.h"

enum {
Expand Down
7 changes: 4 additions & 3 deletions PsyPad/New/LoginViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
Expand All @@ -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];
Expand Down
5 changes: 5 additions & 0 deletions PsyPad/New/SignUpTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit b02735b

Please sign in to comment.