COVIDSafe code from version 1.5 (#5)

This commit is contained in:
COVIDSafe Support 2020-06-05 10:26:40 +10:00 committed by GitHub
parent 6b262be150
commit 149daee2e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 825 additions and 652 deletions

View file

@ -30,7 +30,6 @@
1B86119B24303FA200EA4B6B /* Question3ErrorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B86119A24303FA200EA4B6B /* Question3ErrorViewController.swift */; }; 1B86119B24303FA200EA4B6B /* Question3ErrorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B86119A24303FA200EA4B6B /* Question3ErrorViewController.swift */; };
1B86119D24303FC000EA4B6B /* QuestionUploadDataViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B86119C24303FC000EA4B6B /* QuestionUploadDataViewController.swift */; }; 1B86119D24303FC000EA4B6B /* QuestionUploadDataViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B86119C24303FC000EA4B6B /* QuestionUploadDataViewController.swift */; };
30BE1CAA23F108BA005DCE4F /* UploadFileData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30BE1CA923F108BA005DCE4F /* UploadFileData.swift */; }; 30BE1CAA23F108BA005DCE4F /* UploadFileData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30BE1CA923F108BA005DCE4F /* UploadFileData.swift */; };
30BE1CAD23F119FD005DCE4F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 30BE1CAC23F119FD005DCE4F /* Localizable.strings */; };
30BE1CAF23F1349F005DCE4F /* EncounterRecord.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30BE1CAE23F1349F005DCE4F /* EncounterRecord.swift */; }; 30BE1CAF23F1349F005DCE4F /* EncounterRecord.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30BE1CAE23F1349F005DCE4F /* EncounterRecord.swift */; };
30BE1CB123F134D0005DCE4F /* Encounter+EncounterRecord.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30BE1CB023F134D0005DCE4F /* Encounter+EncounterRecord.swift */; }; 30BE1CB123F134D0005DCE4F /* Encounter+EncounterRecord.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30BE1CB023F134D0005DCE4F /* Encounter+EncounterRecord.swift */; };
30BE1CB523F15D47005DCE4F /* OTPViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30BE1CB423F15D47005DCE4F /* OTPViewController.swift */; }; 30BE1CB523F15D47005DCE4F /* OTPViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30BE1CB423F15D47005DCE4F /* OTPViewController.swift */; };
@ -108,6 +107,8 @@
5B7ABF25244D3BC600BB249B /* IsolationSuccessViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7ABF24244D3BC600BB249B /* IsolationSuccessViewController.swift */; }; 5B7ABF25244D3BC600BB249B /* IsolationSuccessViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7ABF24244D3BC600BB249B /* IsolationSuccessViewController.swift */; };
5B7ABF26244D3BC600BB249B /* IsolationSuccessViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7ABF24244D3BC600BB249B /* IsolationSuccessViewController.swift */; }; 5B7ABF26244D3BC600BB249B /* IsolationSuccessViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7ABF24244D3BC600BB249B /* IsolationSuccessViewController.swift */; };
5B7ABF28244D6BE100BB249B /* UnderSixteenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7ABF27244D6BE100BB249B /* UnderSixteenViewController.swift */; }; 5B7ABF28244D6BE100BB249B /* UnderSixteenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7ABF27244D6BE100BB249B /* UnderSixteenViewController.swift */; };
5B82435E2480DC2100705CB1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5B8243612480DC2100705CB1 /* Localizable.strings */; };
5B82435F2480DC2100705CB1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5B8243612480DC2100705CB1 /* Localizable.strings */; };
5B92D663243011B40049877B /* CovidSafe-config.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5B92D662243011B30049877B /* CovidSafe-config.plist */; }; 5B92D663243011B40049877B /* CovidSafe-config.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5B92D662243011B30049877B /* CovidSafe-config.plist */; };
5B92D66B243018040049877B /* UIProgressView + Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B615C5A623F8EB1700345969 /* UIProgressView + Extension.swift */; }; 5B92D66B243018040049877B /* UIProgressView + Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B615C5A623F8EB1700345969 /* UIProgressView + Extension.swift */; };
5B92D66D243018040049877B /* tracer.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 5DD41D7723DE141700FD4AB0 /* tracer.xcdatamodeld */; }; 5B92D66D243018040049877B /* tracer.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 5DD41D7723DE141700FD4AB0 /* tracer.xcdatamodeld */; };
@ -181,7 +182,6 @@
5B92D6BB243018040049877B /* UploadData.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B6932CE624260E2B003D1810 /* UploadData.storyboard */; }; 5B92D6BB243018040049877B /* UploadData.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B6932CE624260E2B003D1810 /* UploadData.storyboard */; };
5B92D6BD243018040049877B /* JMCTarget.json in Resources */ = {isa = PBXBuildFile; fileRef = A767D2DA242DF1B000DC9E2A /* JMCTarget.json */; }; 5B92D6BD243018040049877B /* JMCTarget.json in Resources */ = {isa = PBXBuildFile; fileRef = A767D2DA242DF1B000DC9E2A /* JMCTarget.json */; };
5B92D6BF243018040049877B /* NewFeedbackFlow.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A767D2D0242DF1B000DC9E2A /* NewFeedbackFlow.storyboard */; }; 5B92D6BF243018040049877B /* NewFeedbackFlow.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A767D2D0242DF1B000DC9E2A /* NewFeedbackFlow.storyboard */; };
5B92D6C2243018040049877B /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 30BE1CAC23F119FD005DCE4F /* Localizable.strings */; };
5B92D6C7243018040049877B /* CovidSafe-config.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5B92D666243012330049877B /* CovidSafe-config.plist */; }; 5B92D6C7243018040049877B /* CovidSafe-config.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5B92D666243012330049877B /* CovidSafe-config.plist */; };
5B92D6C8243018040049877B /* NewFeedbackFlow.strings in Resources */ = {isa = PBXBuildFile; fileRef = A767D2B2242DF1B000DC9E2A /* NewFeedbackFlow.strings */; }; 5B92D6C8243018040049877B /* NewFeedbackFlow.strings in Resources */ = {isa = PBXBuildFile; fileRef = A767D2B2242DF1B000DC9E2A /* NewFeedbackFlow.strings */; };
5B92D6C9243018040049877B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5DD41D4523DCB03D00FD4AB0 /* LaunchScreen.storyboard */; }; 5B92D6C9243018040049877B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5DD41D4523DCB03D00FD4AB0 /* LaunchScreen.storyboard */; };
@ -287,7 +287,6 @@
20A0AADA27329C83CFAB5A7C /* Pods-CovidSafe.covid-staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CovidSafe.covid-staging.xcconfig"; path = "Target Support Files/Pods-CovidSafe/Pods-CovidSafe.covid-staging.xcconfig"; sourceTree = "<group>"; }; 20A0AADA27329C83CFAB5A7C /* Pods-CovidSafe.covid-staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CovidSafe.covid-staging.xcconfig"; path = "Target Support Files/Pods-CovidSafe/Pods-CovidSafe.covid-staging.xcconfig"; sourceTree = "<group>"; };
2B916D8946F8A94E32E569C7 /* Pods-CovidSafe.covid-staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CovidSafe.covid-staging.xcconfig"; path = "Target Support Files/Pods-CovidSafe/Pods-CovidSafe.covid-staging.xcconfig"; sourceTree = "<group>"; }; 2B916D8946F8A94E32E569C7 /* Pods-CovidSafe.covid-staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CovidSafe.covid-staging.xcconfig"; path = "Target Support Files/Pods-CovidSafe/Pods-CovidSafe.covid-staging.xcconfig"; sourceTree = "<group>"; };
30BE1CA923F108BA005DCE4F /* UploadFileData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadFileData.swift; sourceTree = "<group>"; }; 30BE1CA923F108BA005DCE4F /* UploadFileData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadFileData.swift; sourceTree = "<group>"; };
30BE1CAC23F119FD005DCE4F /* Localizable.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = "<group>"; };
30BE1CAE23F1349F005DCE4F /* EncounterRecord.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncounterRecord.swift; sourceTree = "<group>"; }; 30BE1CAE23F1349F005DCE4F /* EncounterRecord.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncounterRecord.swift; sourceTree = "<group>"; };
30BE1CB023F134D0005DCE4F /* Encounter+EncounterRecord.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Encounter+EncounterRecord.swift"; sourceTree = "<group>"; }; 30BE1CB023F134D0005DCE4F /* Encounter+EncounterRecord.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Encounter+EncounterRecord.swift"; sourceTree = "<group>"; };
30BE1CB423F15D47005DCE4F /* OTPViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OTPViewController.swift; sourceTree = "<group>"; }; 30BE1CB423F15D47005DCE4F /* OTPViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OTPViewController.swift; sourceTree = "<group>"; };
@ -333,6 +332,7 @@
5B577814245A584C0088F111 /* UploadDataPrefaceViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadDataPrefaceViewController.swift; sourceTree = "<group>"; }; 5B577814245A584C0088F111 /* UploadDataPrefaceViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadDataPrefaceViewController.swift; sourceTree = "<group>"; };
5B7ABF24244D3BC600BB249B /* IsolationSuccessViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IsolationSuccessViewController.swift; sourceTree = "<group>"; }; 5B7ABF24244D3BC600BB249B /* IsolationSuccessViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IsolationSuccessViewController.swift; sourceTree = "<group>"; };
5B7ABF27244D6BE100BB249B /* UnderSixteenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnderSixteenViewController.swift; sourceTree = "<group>"; }; 5B7ABF27244D6BE100BB249B /* UnderSixteenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnderSixteenViewController.swift; sourceTree = "<group>"; };
5B8243602480DC2100705CB1 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
5B92D662243011B30049877B /* CovidSafe-config.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "CovidSafe-config.plist"; path = "Resources/PROD/CovidSafe-config.plist"; sourceTree = "<group>"; }; 5B92D662243011B30049877B /* CovidSafe-config.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "CovidSafe-config.plist"; path = "Resources/PROD/CovidSafe-config.plist"; sourceTree = "<group>"; };
5B92D666243012330049877B /* CovidSafe-config.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "CovidSafe-config.plist"; path = "Resources/STG/CovidSafe-config.plist"; sourceTree = "<group>"; }; 5B92D666243012330049877B /* CovidSafe-config.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "CovidSafe-config.plist"; path = "Resources/STG/CovidSafe-config.plist"; sourceTree = "<group>"; };
5B92D6D9243018040049877B /* COVIDSafe-staging.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "COVIDSafe-staging.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 5B92D6D9243018040049877B /* COVIDSafe-staging.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "COVIDSafe-staging.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@ -602,9 +602,18 @@
path = RootCAs; path = RootCAs;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
5B82435D2480DAB100705CB1 /* Internationalization */ = {
isa = PBXGroup;
children = (
5B8243612480DC2100705CB1 /* Localizable.strings */,
);
name = Internationalization;
sourceTree = "<group>";
};
5B92D661243005B10049877B /* Resources */ = { 5B92D661243005B10049877B /* Resources */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
5B82435D2480DAB100705CB1 /* Internationalization */,
5B92D665243011D90049877B /* PROD */, 5B92D665243011D90049877B /* PROD */,
5B92D664243011CB0049877B /* STG */, 5B92D664243011CB0049877B /* STG */,
); );
@ -689,7 +698,6 @@
5DD41D4323DCB03D00FD4AB0 /* Assets.xcassets */, 5DD41D4323DCB03D00FD4AB0 /* Assets.xcassets */,
5DD41D4523DCB03D00FD4AB0 /* LaunchScreen.storyboard */, 5DD41D4523DCB03D00FD4AB0 /* LaunchScreen.storyboard */,
5DD41D4823DCB03D00FD4AB0 /* Info.plist */, 5DD41D4823DCB03D00FD4AB0 /* Info.plist */,
30BE1CAC23F119FD005DCE4F /* Localizable.strings */,
5D269C0A23E22CC400ADF2DE /* DeviceIdentifier.swift */, 5D269C0A23E22CC400ADF2DE /* DeviceIdentifier.swift */,
DC24373E23F51531007BDBDF /* covid-Bridging-Header.h */, DC24373E23F51531007BDBDF /* covid-Bridging-Header.h */,
); );
@ -893,7 +901,6 @@
ja, ja,
nb, nb,
"en-GB", "en-GB",
es,
is, is,
da, da,
et, et,
@ -913,6 +920,7 @@
"pt-PT", "pt-PT",
ro, ro,
zh, zh,
es,
); );
mainGroup = 5DD41D2E23DCB03B00FD4AB0; mainGroup = 5DD41D2E23DCB03B00FD4AB0;
productRefGroup = 5DD41D3823DCB03B00FD4AB0 /* Products */; productRefGroup = 5DD41D3823DCB03B00FD4AB0 /* Products */;
@ -937,7 +945,7 @@
59AF2EA92435801400ACCAF2 /* SFSRootCAG2.cer in Resources */, 59AF2EA92435801400ACCAF2 /* SFSRootCAG2.cer in Resources */,
0BDE12302431DCE6003BC44C /* Questions.storyboard in Resources */, 0BDE12302431DCE6003BC44C /* Questions.storyboard in Resources */,
59F25D6A245B917A002A7ED8 /* Spinner_home.json in Resources */, 59F25D6A245B917A002A7ED8 /* Spinner_home.json in Resources */,
5B92D6C2243018040049877B /* Localizable.strings in Resources */, 5B82435F2480DC2100705CB1 /* Localizable.strings in Resources */,
5B92D6C7243018040049877B /* CovidSafe-config.plist in Resources */, 5B92D6C7243018040049877B /* CovidSafe-config.plist in Resources */,
59AF2EA0243560FD00ACCAF2 /* AmazonRootCA1.cer in Resources */, 59AF2EA0243560FD00ACCAF2 /* AmazonRootCA1.cer in Resources */,
5B92D6C8243018040049877B /* NewFeedbackFlow.strings in Resources */, 5B92D6C8243018040049877B /* NewFeedbackFlow.strings in Resources */,
@ -965,7 +973,7 @@
59AF2EA82435801400ACCAF2 /* SFSRootCAG2.cer in Resources */, 59AF2EA82435801400ACCAF2 /* SFSRootCAG2.cer in Resources */,
A767D312242DF1B000DC9E2A /* NewFeedbackFlow.storyboard in Resources */, A767D312242DF1B000DC9E2A /* NewFeedbackFlow.storyboard in Resources */,
59F25D69245B917A002A7ED8 /* Spinner_home.json in Resources */, 59F25D69245B917A002A7ED8 /* Spinner_home.json in Resources */,
30BE1CAD23F119FD005DCE4F /* Localizable.strings in Resources */, 5B82435E2480DC2100705CB1 /* Localizable.strings in Resources */,
5B92D663243011B40049877B /* CovidSafe-config.plist in Resources */, 5B92D663243011B40049877B /* CovidSafe-config.plist in Resources */,
59AF2E9F243560FD00ACCAF2 /* AmazonRootCA1.cer in Resources */, 59AF2E9F243560FD00ACCAF2 /* AmazonRootCA1.cer in Resources */,
A767D30F242DF1B000DC9E2A /* NewFeedbackFlow.strings in Resources */, A767D30F242DF1B000DC9E2A /* NewFeedbackFlow.strings in Resources */,
@ -1293,6 +1301,14 @@
/* End PBXSourcesBuildPhase section */ /* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */ /* Begin PBXVariantGroup section */
5B8243612480DC2100705CB1 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
5B8243602480DC2100705CB1 /* en */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
5DD41D4023DCB03B00FD4AB0 /* Main.storyboard */ = { 5DD41D4023DCB03B00FD4AB0 /* Main.storyboard */ = {
isa = PBXVariantGroup; isa = PBXVariantGroup;
children = ( children = (
@ -1405,7 +1421,7 @@
CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements"; CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements";
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 25; CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_TEAM = 45792XH5L8; DEVELOPMENT_TEAM = 45792XH5L8;
INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0; IPHONEOS_DEPLOYMENT_TARGET = 10.0;
@ -1413,7 +1429,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.4; MARKETING_VERSION = 1.5;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe; PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe;
PRODUCT_NAME = COVIDSafe; PRODUCT_NAME = COVIDSafe;
@ -1488,7 +1504,7 @@
CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements"; CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements";
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 25; CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_TEAM = 45792XH5L8; DEVELOPMENT_TEAM = 45792XH5L8;
INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0; IPHONEOS_DEPLOYMENT_TARGET = 10.0;
@ -1496,7 +1512,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.4; MARKETING_VERSION = 1.5;
PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe; PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe;
PRODUCT_NAME = COVIDSafe; PRODUCT_NAME = COVIDSafe;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
@ -1516,7 +1532,7 @@
CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements"; CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements";
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 25; CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_TEAM = 45792XH5L8; DEVELOPMENT_TEAM = 45792XH5L8;
INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0; IPHONEOS_DEPLOYMENT_TARGET = 10.0;
@ -1524,7 +1540,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.4; MARKETING_VERSION = 1.5;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D DEBUG"; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe; PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe;
@ -1546,7 +1562,7 @@
CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements"; CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements";
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 25; CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_TEAM = 45792XH5L8; DEVELOPMENT_TEAM = 45792XH5L8;
INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0; IPHONEOS_DEPLOYMENT_TARGET = 10.0;
@ -1554,7 +1570,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.4; MARKETING_VERSION = 1.5;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D DEBUG"; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe; PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe;
@ -1576,7 +1592,7 @@
CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements"; CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements";
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 25; CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_TEAM = 45792XH5L8; DEVELOPMENT_TEAM = 45792XH5L8;
INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0; IPHONEOS_DEPLOYMENT_TARGET = 10.0;
@ -1584,7 +1600,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.4; MARKETING_VERSION = 1.5;
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D DEBUG"; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe; PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe;
PRODUCT_MODULE_NAME = COVIDSafe; PRODUCT_MODULE_NAME = COVIDSafe;
@ -1606,7 +1622,7 @@
CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements"; CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements";
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 25; CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_TEAM = 45792XH5L8; DEVELOPMENT_TEAM = 45792XH5L8;
INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0; IPHONEOS_DEPLOYMENT_TARGET = 10.0;
@ -1614,7 +1630,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.4; MARKETING_VERSION = 1.5;
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D DEBUG"; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe; PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe;
PRODUCT_MODULE_NAME = COVIDSafe; PRODUCT_MODULE_NAME = COVIDSafe;
@ -1752,7 +1768,7 @@
CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements"; CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements";
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 25; CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_TEAM = 45792XH5L8; DEVELOPMENT_TEAM = 45792XH5L8;
INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0; IPHONEOS_DEPLOYMENT_TARGET = 10.0;
@ -1760,7 +1776,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.4; MARKETING_VERSION = 1.5;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe; PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe;
PRODUCT_NAME = COVIDSafe; PRODUCT_NAME = COVIDSafe;
@ -1780,7 +1796,7 @@
CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements"; CODE_SIGN_ENTITLEMENTS = "CovidSafe/Project Bluetrace.entitlements";
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 25; CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_TEAM = 45792XH5L8; DEVELOPMENT_TEAM = 45792XH5L8;
INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/CovidSafe/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0; IPHONEOS_DEPLOYMENT_TARGET = 10.0;
@ -1788,7 +1804,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.4; MARKETING_VERSION = 1.5;
PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe; PRODUCT_BUNDLE_IDENTIFIER = au.gov.health.covidsafe;
PRODUCT_NAME = COVIDSafe; PRODUCT_NAME = COVIDSafe;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";

View file

@ -31,11 +31,11 @@
<constraint firstAttribute="width" secondItem="ktg-vZ-UiA" secondAttribute="height" multiplier="1:1" id="wJ3-Vy-1rk"/> <constraint firstAttribute="width" secondItem="ktg-vZ-UiA" secondAttribute="height" multiplier="1:1" id="wJ3-Vy-1rk"/>
</constraints> </constraints>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cme-9F-deB"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cme-9F-deB">
<rect key="frame" x="75" y="288.5" width="170.5" height="41"/> <rect key="frame" x="77" y="288.5" width="166.5" height="42.5"/>
<string key="text">Help stop the spread <string key="text">Help stop the spread
and save lives.</string> and save lives.</string>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/> <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>

File diff suppressed because it is too large Load diff

View file

@ -62,12 +62,12 @@ class Crypto {
} }
// CREATE A LOCAL EPHEMERAL P-256 KEYPAIR // CREATE A LOCAL EPHEMERAL P-256 KEYPAIR
let ephereralPublicKeyAttributes: [CFString: Any] = [ let ephemeralPublicKeyAttributes: [CFString: Any] = [
kSecAttrKeyType: kSecAttrKeyTypeECSECPrimeRandom, kSecAttrKeyType: kSecAttrKeyTypeECSECPrimeRandom,
kSecAttrKeySizeInBits: 256, kSecAttrKeySizeInBits: 256,
] ]
guard let ephemeralPrivateKey = SecKeyCreateRandomKey(ephereralPublicKeyAttributes as CFDictionary, &err) else { guard let ephemeralPrivateKey = SecKeyCreateRandomKey(ephemeralPublicKeyAttributes as CFDictionary, &err) else {
throw err!.takeRetainedValue() as Error throw err!.takeRetainedValue() as Error
} }
guard let ephemeralPublicKey = SecKeyCopyPublicKey(ephemeralPrivateKey) else { guard let ephemeralPublicKey = SecKeyCopyPublicKey(ephemeralPrivateKey) else {

View file

@ -29,13 +29,16 @@ final class FeedbackViewController: UIViewController {
} }
private lazy var sendBarButtonItem: UIBarButtonItem = { private lazy var sendBarButtonItem: UIBarButtonItem = {
let item = UIBarButtonItem(title: "Send", style: .done, target: self, action: #selector(sendButtonTapped)) let item = UIBarButtonItem(title: NSLocalizedString("global_send_button_title",
item.tintColor = .covidSafeColor tableName: "Feedback",
bundle: Bundle.main,
comment: "Send"), style: .done, target: self, action: #selector(sendButtonTapped))
item.tintColor = .covidCareColor
return item return item
}() }()
private lazy var doneButtonItem: UIBarButtonItem = { private lazy var doneButtonItem: UIBarButtonItem = {
let item = UIBarButtonItem(title: "Done", style: .done, target: self, action: #selector(doneButtonTapped)) let item = UIBarButtonItem(title: NSLocalizedString("Done", comment: "Done"), style: .done, target: self, action: #selector(doneButtonTapped))
item.tintColor = .covidSafeColor item.tintColor = .covidSafeColor
return item return item
}() }()
@ -145,7 +148,8 @@ final class FeedbackViewController: UIViewController {
@objc private func sendButtonTapped(_ sender: Any) { @objc private func sendButtonTapped(_ sender: Any) {
guard emailTextField.isValid else { guard emailTextField.isValid else {
let errorMessage = "Please enter a valid email address!" let errorMessage = NSLocalizedString("newFeedback_invalidEmail_errorMessage",tableName: "Feedback",
bundle: Bundle.main, comment: "Please enter a valid email address!")
showErrorMessage(errorMessage) showErrorMessage(errorMessage)
return return
} }

View file

@ -32,7 +32,8 @@ class HelpNavController: UINavigationController {
let feedbackButton = UIButton(type: .system) let feedbackButton = UIButton(type: .system)
feedbackButton.translatesAutoresizingMaskIntoConstraints = false feedbackButton.translatesAutoresizingMaskIntoConstraints = false
feedbackButton.addTarget(self, action: #selector(feedbackButtonPressed(_:)), for: .touchUpInside) feedbackButton.addTarget(self, action: #selector(feedbackButtonPressed(_:)), for: .touchUpInside)
feedbackButton.setTitle("Report an issue", for: .normal) feedbackButton.setTitle(NSLocalizedString("ReportAnIssue", comment: "Report an issue"),
for: .normal)
feedbackButton.titleLabel?.font = .systemFont(ofSize: 18) feedbackButton.titleLabel?.font = .systemFont(ofSize: 18)
feedbackButton.tintColor = .covidSafeColor feedbackButton.tintColor = .covidSafeColor

View file

@ -25,6 +25,7 @@ class HomeViewController: UIViewController {
@IBOutlet weak var pushNotificationStatusIcon: UIImageView! @IBOutlet weak var pushNotificationStatusIcon: UIImageView!
@IBOutlet weak var pushNotificationStatusLabel: UILabel! @IBOutlet weak var pushNotificationStatusLabel: UILabel!
@IBOutlet weak var uploadDateLabel: UILabel! @IBOutlet weak var uploadDateLabel: UILabel!
@IBOutlet weak var pairingRequestsLabel: UILabel!
var lottieBluetoothView: AnimationView! var lottieBluetoothView: AnimationView!
@ -44,7 +45,11 @@ class HomeViewController: UIViewController {
let dateFormatterPrint = DateFormatter() let dateFormatterPrint = DateFormatter()
dateFormatterPrint.dateFormat = "dd MMM yyyy" dateFormatterPrint.dateFormat = "dd MMM yyyy"
let formattedDate = dateFormatterPrint.string(from: lastUpload) let formattedDate = dateFormatterPrint.string(from: lastUpload)
let newAttributedString = NSMutableAttributedString(string: "Your information was uploaded on \(formattedDate).") let newAttributedString = NSMutableAttributedString(
string: String.localizedStringWithFormat(
NSLocalizedString("InformationUploaded", comment: "Information uploaded template"),
formattedDate)
)
guard let dateRange = newAttributedString.string.range(of: formattedDate) else { return nil } guard let dateRange = newAttributedString.string.range(of: formattedDate) else { return nil }
let nsRange = NSRange(dateRange, in: newAttributedString.string) let nsRange = NSRange(dateRange, in: newAttributedString.string)
@ -87,10 +92,21 @@ class HomeViewController: UIViewController {
NotificationCenter.default.addObserver(self, selector: #selector(appWillEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(appWillEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
if let versionNumber = Bundle.main.versionShort, let buildNumber = Bundle.main.version { if let versionNumber = Bundle.main.versionShort, let buildNumber = Bundle.main.version {
self.versionNumberLabel.text = "Version number: \(versionNumber) Build: \(buildNumber)" self.versionNumberLabel.text = String.localizedStringWithFormat(
NSLocalizedString("VersionNumber", comment: "Version number template"),
versionNumber,buildNumber
)
} else { } else {
toggleViewVisibility(view: versionView, isVisible: false) toggleViewVisibility(view: versionView, isVisible: false)
} }
let pairingRequestString = NSLocalizedString("PairingRequestsInfo", comment: "Text explaining COVIDSafe does not send pairing requests")
let pairingRequestText = NSMutableAttributedString(string: pairingRequestString,
attributes: [.font: UIFont.preferredFont(forTextStyle: .body)])
let pairingRequestUnderlinedString = NSLocalizedString("PairingRequestsInfoUnderline", comment: "section of text that should be underlined from the PairingRequestsInfo text")
let requestsRange = pairingRequestText.string.range(of: pairingRequestUnderlinedString)!
let nsRange = NSRange(requestsRange, in: pairingRequestText.string)
pairingRequestText.addAttribute(.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: nsRange)
pairingRequestsLabel.attributedText = pairingRequestText
} }
deinit { deinit {
@ -200,11 +216,10 @@ class HomeViewController: UIViewController {
self.helpButton.setImage(UIImage(named: "ic-help-selected"), for: .normal) self.helpButton.setImage(UIImage(named: "ic-help-selected"), for: .normal)
self.helpButton.setTitleColor(UIColor.black, for: .normal) self.helpButton.setTitleColor(UIColor.black, for: .normal)
self.homeHeaderInfoText.font = UIFont.systemFont(ofSize: 18, weight: .regular) self.homeHeaderInfoText.text = NSLocalizedString("HomeHeaderNoAction", comment: "Header with no action req")
self.homeHeaderInfoText.text = "COVIDSafe is active.\nNo further action is required."
if (!self.allPermissionOn) { if (!self.allPermissionOn) {
self.homeHeaderInfoText.text = "COVIDSafe is not active.\nCheck your permissions." self.homeHeaderInfoText.text = NSLocalizedString("HomeHeaderPermissions", comment: "Header with check permisisons text")
self.homeHeaderView.backgroundColor = UIColor.covidHomePermissionErrorColor self.homeHeaderView.backgroundColor = UIColor.covidHomePermissionErrorColor
} else { } else {
self.homeHeaderView.backgroundColor = UIColor.covidHomeActiveColor self.homeHeaderView.backgroundColor = UIColor.covidHomeActiveColor
@ -230,11 +245,11 @@ class HomeViewController: UIViewController {
switch self.pushNotificationOn { switch self.pushNotificationOn {
case true: case true:
pushNotificationStatusIcon.isHighlighted = false pushNotificationStatusIcon.isHighlighted = false
pushNotificationStatusTitle.text = "Notifications are enabled" pushNotificationStatusTitle.text = NSLocalizedString("NotificationsEnabled", comment: "Notifications Enabled")
let newAttributedLabel = NSMutableAttributedString(string: "You will receive a notification if COVIDSafe is not active. Change notification settings") let newAttributedLabel = NSMutableAttributedString(string: NSLocalizedString("NotificationsEnabledBlurb", comment: "Notifications Enabled content blurb"), attributes: [.font: UIFont.preferredFont(forTextStyle: .caption1)])
//set some attributes //set some attributes
guard let linkRange = newAttributedLabel.string.range(of: "Change notification settings") else { return } guard let linkRange = newAttributedLabel.string.range(of: NSLocalizedString("NotificationsBlurbLink", comment: "Notifications blurb link")) else { return }
let nsRange = NSRange(linkRange, in: newAttributedLabel.string) let nsRange = NSRange(linkRange, in: newAttributedLabel.string)
newAttributedLabel.addAttribute(.foregroundColor, newAttributedLabel.addAttribute(.foregroundColor,
value: UIColor.covidSafeColor, value: UIColor.covidSafeColor,
@ -244,11 +259,13 @@ class HomeViewController: UIViewController {
default: default:
pushNotificationStatusIcon.isHighlighted = true pushNotificationStatusIcon.isHighlighted = true
pushNotificationStatusTitle.text = "Notifications are disabled" pushNotificationStatusTitle.text = NSLocalizedString("NotificationsDisabled", comment: "Notifications Enabled")
let newAttributedLabel = NSMutableAttributedString(string: "You will not receive a notification if COVIDSafe is not active. Change notification settings") let newAttributedLabel = NSMutableAttributedString(string:
NSLocalizedString("NotificationsDisabledBlurb", comment: "Notifications Enabled content blurb"), attributes: [.font: UIFont.preferredFont(forTextStyle: .caption1)])
//set some attributes //set some attributes
guard let linkRange = newAttributedLabel.string.range(of: "Change notification settings") else { return } guard let linkRange = newAttributedLabel.string.range(of:
NSLocalizedString("NotificationsBlurbLink", comment: "Notifications blurb link")) else { return }
let nsRange = NSRange(linkRange, in: newAttributedLabel.string) let nsRange = NSRange(linkRange, in: newAttributedLabel.string)
newAttributedLabel.addAttribute(.foregroundColor, newAttributedLabel.addAttribute(.foregroundColor,
value: UIColor.covidSafeColor, value: UIColor.covidSafeColor,
@ -363,7 +380,7 @@ class HomeViewController: UIViewController {
struct TracerRemoteConfig { struct TracerRemoteConfig {
static let defaultShareText = """ static let defaultShareText = """
Join me in stopping the spread of COVID-19! Download COVIDSafe, an app from the Australian Government. #COVID19 \(NSLocalizedString("ShareText", comment: "Share app with friends text")) #COVID19
#coronavirusaustralia #stayhomesavelives https://covidsafe.gov.au #coronavirusaustralia #stayhomesavelives https://covidsafe.gov.au
""" """
} }

View file

@ -1,21 +0,0 @@
/*
Localizable.strings
CovidSafe
Copyright © 2020 Australian Government. All rights reserved.
*/
// OTP
"EnterOTPSent" = "Enter PIN that was sent to %@";
"WrongNumber" = "Wrong number?";
"ResendCode" = "Resend PIN";
"InvalidOTP" = "Must be a 6-digit code";
"WrongOTP" = "Wrong PIN entered";
"CodeWillExpired" = "Your code will expire in %@";
"CodeHasExpired" = "Your code has expired.";
"NotAValidCode" = "Not a valid code";
"DataUploaded" = "Data uploaded";
"DataNotUploaded" = "Data not uploaded";

View file

@ -25,6 +25,7 @@ class OTPViewController: UIViewController, RegistrationHandler {
@IBOutlet weak var wrongNumberButton: UIButton? @IBOutlet weak var wrongNumberButton: UIButton?
@IBOutlet weak var resendCodeButton: UIButton? @IBOutlet weak var resendCodeButton: UIButton?
@IBOutlet weak var pinIssuesButton: UIButton?
@IBOutlet weak var verifyButton: UIButton? @IBOutlet weak var verifyButton: UIButton?
@ -57,6 +58,27 @@ class OTPViewController: UIViewController, RegistrationHandler {
dismissKeyboardOnTap() dismissKeyboardOnTap()
codeInputView?.isOneTimeCode = true codeInputView?.isOneTimeCode = true
let linkAtt: [NSAttributedString.Key : Any] = [
.font: UIFont.preferredFont(forTextStyle: .callout),
.foregroundColor: UIColor.covidSafeColor,
.underlineStyle: NSUnderlineStyle.single.rawValue
]
let wrongNumberText = NSAttributedString(string: NSLocalizedString("IsThisNumberWrong",
comment: "Is the entered mobile number incorrect"),
attributes: linkAtt)
self.wrongNumberButton?.setAttributedTitle(wrongNumberText, for: .normal)
let buttonAtt: [NSAttributedString.Key : Any] = [
.font: UIFont.preferredFont(forTextStyle: .body),
.foregroundColor: UIColor.covidSafeColor,
.underlineStyle: NSUnderlineStyle.single.rawValue
]
let resendPin = NSLocalizedString("ResendPin", comment: "Text for resend pin button")
let resendCodeText = NSAttributedString(string: resendPin, attributes: buttonAtt)
self.resendCodeButton?.setAttributedTitle(resendCodeText, for: .normal)
let pinIssuesString = NSLocalizedString("ReceivePinIssue", comment: "Text for pin receive issues button")
let pinIssuesText = NSAttributedString(string: pinIssuesString, attributes: buttonAtt)
self.pinIssuesButton?.setAttributedTitle(pinIssuesText, for: .normal)
} }
@ -67,7 +89,9 @@ class OTPViewController: UIViewController, RegistrationHandler {
if let regInfo = registrationInfo { if let regInfo = registrationInfo {
numberWithCountryCode = "+61 \(regInfo.phoneNumber)" numberWithCountryCode = "+61 \(regInfo.phoneNumber)"
} }
self.titleLabel.text = "Enter the PIN sent to \(numberWithCountryCode)" self.titleLabel.text = String.localizedStringWithFormat(
NSLocalizedString("EnterPINSent", comment: "Enter the PIN sent template"), numberWithCountryCode
)
startTimer() startTimer()
} }
@ -105,7 +129,9 @@ class OTPViewController: UIViewController, RegistrationHandler {
if (countdown.range(of: #"\d{2}:"#, options: .regularExpression) != nil) { if (countdown.range(of: #"\d{2}:"#, options: .regularExpression) != nil) {
countdownFormatted = String(countdown.suffix(from: countdown.index(after: countdown.startIndex))) countdownFormatted = String(countdown.suffix(from: countdown.index(after: countdown.startIndex)))
} }
expiredMessageLabel?.text = "Your PIN will expire in \(countdownFormatted)" expiredMessageLabel?.text = String.localizedStringWithFormat(
NSLocalizedString("PINWillExpire", comment: "PIN will expire template"), countdownFormatted
)
expiredMessageLabel?.isHidden = false expiredMessageLabel?.isHidden = false
if let OTP = codeInputView?.text { if let OTP = codeInputView?.text {
verifyButton?.isEnabled = OTP.count > 0 verifyButton?.isEnabled = OTP.count > 0
@ -137,7 +163,9 @@ class OTPViewController: UIViewController, RegistrationHandler {
} }
PhoneValidationAPI.verifyPhoneNumber(regInfo: self.registrationInfo!) {[weak self] (session, error) in PhoneValidationAPI.verifyPhoneNumber(regInfo: self.registrationInfo!) {[weak self] (session, error) in
if let error = error { if let error = error {
let errorAlert = UIAlertController(title: "Error verifying phone number", message: "Please try again later.", preferredStyle: .alert) let errorAlert = UIAlertController(title: NSLocalizedString("PhoneVerificationErrorTitle", comment: "Phone verification error title"),
message: NSLocalizedString("PhoneVerificationErrorMessage", comment: "Phone verification error message"),
preferredStyle: .alert)
errorAlert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "Default action"), style: .default, handler: { _ in errorAlert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "Default action"), style: .default, handler: { _ in
NSLog("Unable to verify phone number") NSLog("Unable to verify phone number")
})) }))
@ -174,7 +202,9 @@ class OTPViewController: UIViewController, RegistrationHandler {
verifyPhoneNumber(parsedNumber) verifyPhoneNumber(parsedNumber)
case .failure(let error): case .failure(let error):
let errorAlert = UIAlertController(title: "Wrong number format", message: "Please enter a mobile phone number", preferredStyle: .alert) let errorAlert = UIAlertController(title: NSLocalizedString("PhoneNumberFormatErrorTitle", comment: "Wrong phone format error title"),
message: NSLocalizedString("PhoneNumberFormatErrorMessage", comment: "Wrong phone format error message"),
preferredStyle: .alert)
errorAlert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "Default action"), style: .default, handler: { _ in errorAlert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "Default action"), style: .default, handler: { _ in
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
NSLog("Unable to verify phone number") NSLog("Unable to verify phone number")

View file

@ -6,11 +6,39 @@
// //
import UIKit import UIKit
import CoreBluetooth
import UserNotifications import UserNotifications
class OnboardingStep2ViewController: UIViewController { class OnboardingStep2ViewController: UIViewController {
private var bluetoothDidUpdateStateCallback: ((CBManagerState) -> Void)?
@IBAction func onBackTapped(_ sender: UIButton) { @IBAction func onBackTapped(_ sender: UIButton) {
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
@IBAction func proceedTapped(_ sender: UIButton) {
self.bluetoothDidUpdateStateCallback = BluetraceManager.shared.bluetoothDidUpdateStateCallback
BluetraceManager.shared.bluetoothDidUpdateStateCallback = centralDidUpdateStateCallback
BluetraceManager.shared.turnOn()
UserDefaults.standard.set(true, forKey: "turnedOnBluetooth")
}
func centralDidUpdateStateCallback(_ state: CBManagerState) {
DLog("state changed in permission request to \(BluetraceUtils.centralStateToString(state))")
requestPushPermissions()
}
func requestPushPermissions() {
BluetraceManager.shared.bluetoothDidUpdateStateCallback = self.bluetoothDidUpdateStateCallback
UNUserNotificationCenter.current()
.requestAuthorization(options: [.alert, .sound, .badge]) {
granted, error in
UserDefaults.standard.set(true, forKey: "allowedPermissions")
print("Permissions granted: \(granted)")
DispatchQueue.main.async {
self.performSegue(withIdentifier: "showSuccessSegue", sender: self)
}
}
}
} }

View file

@ -9,11 +9,32 @@ import UIKit
import SafariServices import SafariServices
class OnboardingStep2bViewController: UIViewController { class OnboardingStep2bViewController: UIViewController {
@IBOutlet weak var pointOneLabel: UILabel!
override func viewDidAppear(_ animated: Bool) { @IBOutlet weak var pointTwoLabel: UILabel!
super.viewDidAppear(animated) @IBOutlet weak var pointThreeLabel: UILabel!
BluetraceManager.shared.turnOn()
UserDefaults.standard.set(true, forKey: "turnedOnBluetooth") override func viewDidLoad() {
super.viewDidLoad()
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.headIndent = 18.0
let labelAtt: [NSAttributedString.Key : Any] = [
.paragraphStyle: paragraphStyle,
.font: UIFont.preferredFont(forTextStyle: .body)
]
let pointOneText = NSAttributedString(string: NSLocalizedString("PointOne", comment: "Keep phone on you when you leave home"),
attributes: labelAtt)
pointOneLabel.attributedText = pointOneText
let pointTwoText = NSAttributedString(string: NSLocalizedString("PointTwo", comment: "Keep bluetooth turned on"),
attributes: labelAtt)
pointTwoLabel.attributedText = pointTwoText
let pointThreeText = NSMutableAttributedString(string: NSLocalizedString("PointThree", comment: "COVIDSafe does NOT send pairing requests"),
attributes: labelAtt)
let learnMoreRange = pointThreeText.string.range(of: NSLocalizedString("PointThreeUnderline", comment: "Text that should be underlined from PointThree"))!
let nsRange = NSRange(learnMoreRange, in: pointThreeText.string)
pointThreeText.addAttributes([.underlineStyle: NSUnderlineStyle.single.rawValue, .foregroundColor: UIColor.covidSafeColor], range: nsRange)
pointThreeLabel.attributedText = pointThreeText
} }
@IBAction func learnMoreTapped(_ sender: Any) { @IBAction func learnMoreTapped(_ sender: Any) {
@ -26,21 +47,6 @@ class OnboardingStep2bViewController: UIViewController {
} }
@IBAction func continueBtnTapped(_ sender: UIButton) { @IBAction func continueBtnTapped(_ sender: UIButton) {
requestAllPermissions() self.performSegue(withIdentifier: "showHomeSegue", sender: self)
}
func requestAllPermissions() {
UNUserNotificationCenter.current() // 1
.requestAuthorization(options: [.alert, .sound, .badge]) { // 2
granted, error in
UserDefaults.standard.set(true, forKey: "allowedPermissions")
print("Permissions granted: \(granted)") // 3
DispatchQueue.main.async {
self.performSegue(withIdentifier: "showHomeSegue", sender: self)
}
}
} }
} }

View file

@ -17,12 +17,21 @@ class PersonalDetailsViewController: UIViewController, UITextFieldDelegate, UIPi
@IBOutlet weak var scrollview: UIScrollView! @IBOutlet weak var scrollview: UIScrollView!
@IBOutlet weak var dimView: UIView! @IBOutlet weak var dimView: UIView!
@IBOutlet weak var backButton: UIButton! @IBOutlet weak var backButton: UIButton!
@IBOutlet weak var fullNameErrorLabel: UILabel!
@IBOutlet weak var ageErrorLabel: UILabel!
@IBOutlet weak var postcodeErrorLabel: UILabel!
@IBOutlet weak var fullnameLabel: UILabel!
@IBOutlet weak var postcodeLabel: UILabel!
@IBOutlet weak var enterYourDetailsLabel: UILabel!
@IBOutlet weak var ageRangeLabel: UILabel!
var agePicker: UIPickerView? var agePicker: UIPickerView?
var pickerBarButtonItem: UIBarButtonItem? var pickerBarButtonItem: UIBarButtonItem?
var currentKeyboardFrame: CGRect? var currentKeyboardFrame: CGRect?
var nextBarButtonItem: UIBarButtonItem? var nextBarButtonItem: UIBarButtonItem?
var selectedAge: Int = -1 var selectedAge: Int = -1
let ages = ["0 - 15", "16 - 29", "30 - 39", "40 - 49", "50 - 59", "60 - 69", "70 - 79", "80 - 89", "90+"] let ages = ["0 - 15", "16 - 29", "30 - 39", "40 - 49", "50 - 59", "60 - 69", "70 - 79", "80 - 89", "90+"]
var initialLabelTextColour: UIColor?
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -37,20 +46,26 @@ class PersonalDetailsViewController: UIViewController, UITextFieldDelegate, UIPi
let toolBar = UIToolbar() let toolBar = UIToolbar()
toolBar.sizeToFit() toolBar.sizeToFit()
self.nextBarButtonItem = UIBarButtonItem(title: "Done", style: .plain, target: self, action: #selector(self.nextButtonTapped)) self.nextBarButtonItem = UIBarButtonItem(title: NSLocalizedString("Done", comment: "Done"),
style: .plain,
target: self,
action: #selector(self.nextButtonTapped))
let spacer = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil) let spacer = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)
toolBar.setItems([spacer, self.nextBarButtonItem!], animated: true) toolBar.setItems([spacer, self.nextBarButtonItem!], animated: true)
toolBar.isUserInteractionEnabled = true toolBar.isUserInteractionEnabled = true
self.postcodeTextField.inputAccessoryView = toolBar self.postcodeTextField.inputAccessoryView = toolBar
self.ageTextField.inputAccessoryView = toolBar self.ageTextField.inputAccessoryView = toolBar
self.firstnameTextField.inputAccessoryView = toolBar self.firstnameTextField.inputAccessoryView = toolBar
initialLabelTextColour = fullnameLabel.textColor
} }
override func viewDidAppear(_ animated: Bool) { override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated) super.viewDidAppear(animated)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(notif:)), name: UIResponder.keyboardWillHideNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(notif:)), name: UIResponder.keyboardWillHideNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillChangeFrame(notif:)), name: UIResponder.keyboardWillChangeFrameNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillChangeFrame(notif:)), name: UIResponder.keyboardWillChangeFrameNotification, object: nil)
self.firstnameTextField.becomeFirstResponder() if(UIAccessibility.isVoiceOverRunning){
UIAccessibility.post(notification: .screenChanged, argument: enterYourDetailsLabel)
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@ -187,11 +202,19 @@ class PersonalDetailsViewController: UIViewController, UITextFieldDelegate, UIPi
func textFieldDidBeginEditing(_ textField: UITextField) { func textFieldDidBeginEditing(_ textField: UITextField) {
if (textField == firstnameTextField || textField == postcodeTextField) { if (textField == firstnameTextField || textField == postcodeTextField) {
nextBarButtonItem?.title = "Done" nextBarButtonItem?.title = NSLocalizedString("Done", comment: "Done")
if(UIAccessibility.isVoiceOverRunning) { if(UIAccessibility.isVoiceOverRunning) {
firstnameTextField.isAccessibilityElement = true firstnameTextField.isAccessibilityElement = true
postcodeTextField.isAccessibilityElement = true postcodeTextField.isAccessibilityElement = true
backButton.isAccessibilityElement = true backButton.isAccessibilityElement = true
enterYourDetailsLabel.isAccessibilityElement = true
fullnameLabel.isAccessibilityElement = true
ageRangeLabel.isAccessibilityElement = true
postcodeLabel.isAccessibilityElement = true
fullNameErrorLabel.isAccessibilityElement = true
ageErrorLabel.isAccessibilityElement = true
postcodeErrorLabel.isAccessibilityElement = true
ageTextField.isAccessibilityElement = true
} }
} else if (textField == ageTextField) { } else if (textField == ageTextField) {
dimView.isHidden = false dimView.isHidden = false
@ -199,8 +222,17 @@ class PersonalDetailsViewController: UIViewController, UITextFieldDelegate, UIPi
firstnameTextField.isAccessibilityElement = false firstnameTextField.isAccessibilityElement = false
postcodeTextField.isAccessibilityElement = false postcodeTextField.isAccessibilityElement = false
backButton.isAccessibilityElement = false backButton.isAccessibilityElement = false
enterYourDetailsLabel.isAccessibilityElement = false
fullnameLabel.isAccessibilityElement = false
ageRangeLabel.isAccessibilityElement = false
postcodeLabel.isAccessibilityElement = false
fullNameErrorLabel.isAccessibilityElement = false
ageErrorLabel.isAccessibilityElement = false
postcodeErrorLabel.isAccessibilityElement = false
ageTextField.isAccessibilityElement = false
UIAccessibility.post(notification: .screenChanged, argument: agePicker)
} }
nextBarButtonItem?.title = "Next" nextBarButtonItem?.title = NSLocalizedString("Next", comment: "Next")
} }
} }
@ -213,15 +245,37 @@ class PersonalDetailsViewController: UIViewController, UITextFieldDelegate, UIPi
} }
textField.text = ages[currentRow] textField.text = ages[currentRow]
selectedAge = currentRow selectedAge = currentRow
} else if textField == postcodeTextField {
if textField.text?.count != 4 {
postcodeErrorLabel.isHidden = false
postcodeLabel.textColor = UIColor.covidSafeErrorColor
postcodeTextField.borderWidth = 1
} else {
postcodeErrorLabel.isHidden = true
postcodeLabel.textColor = initialLabelTextColour
postcodeTextField.borderWidth = 0
}
} else if textField == firstnameTextField {
if textField.text == "" {
fullNameErrorLabel.isHidden = false
fullnameLabel.textColor = UIColor.covidSafeErrorColor
firstnameTextField.borderWidth = 1
} else {
fullNameErrorLabel.isHidden = true
fullnameLabel.textColor = initialLabelTextColour
firstnameTextField.borderWidth = 0
}
} }
updateContinueButton() updateContinueButton()
} }
func presentValidationError(error: String, fieldToFocus: UITextField) { func presentValidationError(error: String, fieldToFocus: UITextField) {
let errorAlert = UIAlertController(title: "Validation error", let errorAlert = UIAlertController(title: NSLocalizedString("ValidationError", comment: "Validation error"),
message: error, message: error,
preferredStyle: .alert) preferredStyle: .alert)
errorAlert.addAction(UIAlertAction(title: "OK", style: .default, handler: { _ in errorAlert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "OK"),
style: .default,
handler: { _ in
fieldToFocus.becomeFirstResponder() fieldToFocus.becomeFirstResponder()
})) }))
self.present(errorAlert, animated: true) self.present(errorAlert, animated: true)
@ -249,7 +303,7 @@ class PersonalDetailsViewController: UIViewController, UITextFieldDelegate, UIPi
return return
} }
guard postCode.range(of: #"^(0[2|8|9]|[1-9][0-9])\d{2}$"#, options: .regularExpression) != nil else { guard postCode.range(of: #"^(0[2|8|9]|[1-9][0-9])\d{2}$"#, options: .regularExpression) != nil else {
presentValidationError(error: "Please enter a valid postcode", presentValidationError(error: NSLocalizedString("PostcodeValidationErrorMessage", comment: "Please enter a valid postcode"),
fieldToFocus: postcodeTextField) fieldToFocus: postcodeTextField)
return return
} }

View file

@ -9,6 +9,7 @@ class PhoneNumberViewController: UIViewController, UITextFieldDelegate, Registra
@IBOutlet weak var titleLabel: UILabel! @IBOutlet weak var titleLabel: UILabel!
let PHONE_NUMBER_LENGTH = 17 // e.g. "+61 4 12 345 678 " if text is auto-pasted from text message let PHONE_NUMBER_LENGTH = 17 // e.g. "+61 4 12 345 678 " if text is auto-pasted from text message
@IBOutlet weak var activityIndicator: UIActivityIndicatorView! @IBOutlet weak var activityIndicator: UIActivityIndicatorView!
@IBOutlet weak var ausPhoneNumberButton: UIButton!
var selectedCountry: String? = "Australia" var selectedCountry: String? = "Australia"
var countryList: [String] = CountriesData.countryArray var countryList: [String] = CountriesData.countryArray
// If this view is part of the reauthentiation flow of an expired JWT // If this view is part of the reauthentiation flow of an expired JWT
@ -22,8 +23,17 @@ class PhoneNumberViewController: UIViewController, UITextFieldDelegate, Registra
phoneNumberField.delegate = self phoneNumberField.delegate = self
dismissKeyboardOnTap() dismissKeyboardOnTap()
if (reauthenticating) { if (reauthenticating) {
self.titleLabel.text = "Enter your mobile number to re-verify" self.titleLabel.text = NSLocalizedString("EnterPhoneReVerify", comment: "Enter your mobile number to re-verify")
} }
let ausNumberAtt: [NSAttributedString.Key : Any] = [
.font: UIFont.preferredFont(forTextStyle: .body),
.foregroundColor: UIColor.covidSafeColor,
.underlineStyle: NSUnderlineStyle.single.rawValue
]
let ausNumberButtonText = NSAttributedString(string: NSLocalizedString("AusPhoneNumberButton", comment: "Link to help page about using an australian phone number"),
attributes: ausNumberAtt)
self.ausPhoneNumberButton.setAttributedTitle(ausNumberButtonText, for: .normal)
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
@ -73,7 +83,9 @@ class PhoneNumberViewController: UIViewController, UITextFieldDelegate, Registra
verifyPhoneNumber(parsedNumber) verifyPhoneNumber(parsedNumber)
case .failure(let error): case .failure(let error):
let errorAlert = UIAlertController(title: "Wrong number format", message: "Please enter a mobile phone number", preferredStyle: .alert) let errorAlert = UIAlertController(title: NSLocalizedString("PhoneNumberFormatErrorTitle", comment: "Wrong phone format error title"),
message: NSLocalizedString("PhoneNumberFormatErrorMessage", comment: "Wrong phone format error message"),
preferredStyle: .alert)
errorAlert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "Default action"), style: .default, handler: { _ in errorAlert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "Default action"), style: .default, handler: { _ in
NSLog("Unable to verify phone number") NSLog("Unable to verify phone number")
})) }))
@ -92,7 +104,8 @@ class PhoneNumberViewController: UIViewController, UITextFieldDelegate, Registra
self?.activityIndicator.stopAnimating() self?.activityIndicator.stopAnimating()
self?.getOTPButton.isEnabled = true self?.getOTPButton.isEnabled = true
if let error = error { if let error = error {
let errorAlert = UIAlertController(title: "Error verifying phone number", message: "Please check your details and try again.", preferredStyle: .alert) let errorAlert = UIAlertController(title: NSLocalizedString("PhoneVerificationErrorTitle", comment: "Phone verification error title"),
message: NSLocalizedString("PhoneVerificationErrorMessage", comment: "Phone verification error message"), preferredStyle: .alert)
errorAlert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "Default action"), style: .default, handler: { _ in errorAlert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "Default action"), style: .default, handler: { _ in
DLog("Unable to verify phone number") DLog("Unable to verify phone number")
})) }))

View file

@ -9,27 +9,6 @@ import UIKit
class RegistrationConsentViewController: UIViewController { class RegistrationConsentViewController: UIViewController {
@IBOutlet weak var consentCheckBox: UIButton!
@IBOutlet weak var agreeButton: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
agreeButton.isEnabled = false
consentCheckBox.setImage(UIImage(named: "emptyCheckbox"), for: .normal)
consentCheckBox.setImage(UIImage(named: "selectedCheckbox"), for: .selected)
updateContinueButton()
// Do any additional setup after loading the view.
}
@IBAction func onCheckboxTapped(sender: UIButton) {
sender.isSelected = !sender.isSelected
self.agreeButton.isEnabled = sender.isSelected
updateContinueButton()
consentCheckBox.accessibilityLabel = sender.isSelected ? "I consent checkbox, checked" : "I consent checkbox, unchecked"
}
@IBAction func onBackTapped(_ sender: UIButton) { @IBAction func onBackTapped(_ sender: UIButton) {
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
@ -38,24 +17,4 @@ class RegistrationConsentViewController: UIViewController {
UserDefaults.standard.set(true, forKey: "hasConsented") UserDefaults.standard.set(true, forKey: "hasConsented")
performSegue(withIdentifier: "iConsentSegue", sender: nil) performSegue(withIdentifier: "iConsentSegue", sender: nil)
} }
func updateContinueButton() {
if (agreeButton.isEnabled) {
agreeButton.backgroundColor = UIColor.covidSafeButtonDarkerColor
} else {
agreeButton.backgroundColor = UIColor(0xDBDDDD)
}
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
} }

View file

@ -8,6 +8,7 @@ extension UIColor {
static let covidSafeColor = UIColor(0x00661B) static let covidSafeColor = UIColor(0x00661B)
static let covidSafeLighterColor = UIColor(0x008A23) static let covidSafeLighterColor = UIColor(0x008A23)
static let covidSafeButtonDarkerColor = UIColor(0x00661B) static let covidSafeButtonDarkerColor = UIColor(0x00661B)
static let covidSafeErrorColor = UIColor(0xA31919)
var asSolidBackgroundImage: UIImage { var asSolidBackgroundImage: UIImage {
let rect = CGRect(x: 0, y: 0, width: 20, height: 20) let rect = CGRect(x: 0, y: 0, width: 20, height: 20)

View file

@ -11,42 +11,17 @@ import SafariServices
class UnderSixteenViewController: UIViewController, RegistrationHandler { class UnderSixteenViewController: UIViewController, RegistrationHandler {
@IBOutlet weak var consentCheckBox: UIButton!
@IBOutlet weak var agreeButton: UIButton!
public var registrationInfo: RegistrationRequest? public var registrationInfo: RegistrationRequest?
override func viewDidLoad() {
super.viewDidLoad()
consentCheckBox.setImage(UIImage(named: "emptyCheckbox"), for: .normal)
consentCheckBox.setImage(UIImage(named: "selectedCheckbox"), for: .selected)
updateContinueButton()
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if var vc = segue.destination as? RegistrationHandler { if var vc = segue.destination as? RegistrationHandler {
vc.registrationInfo = self.registrationInfo vc.registrationInfo = self.registrationInfo
} }
} }
func updateContinueButton() {
if (agreeButton.isEnabled) {
agreeButton.backgroundColor = UIColor.covidSafeButtonDarkerColor
} else {
agreeButton.backgroundColor = UIColor(0xDBDDDD)
}
}
@IBAction func onBackTapped(_ sender: UIButton) { @IBAction func onBackTapped(_ sender: UIButton) {
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
@IBAction func onCheckboxTapped(sender: UIButton) {
sender.isSelected = !sender.isSelected
self.agreeButton.isEnabled = sender.isSelected
updateContinueButton()
consentCheckBox.accessibilityLabel = sender.isSelected ? "I consent checkbox, checked" : "I consent checkbox, unchecked"
}
@IBAction func doneOntap(_ sender: Any) { @IBAction func doneOntap(_ sender: Any) {
performSegue(withIdentifier: "under16Consent", sender: nil) performSegue(withIdentifier: "under16Consent", sender: nil)

View file

@ -45,7 +45,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="593"/> <rect key="frame" x="0.0" y="0.0" width="375" height="593"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="135-V4-pIA" userLabel="ContentView"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="135-V4-pIA" userLabel="ContentView">
<rect key="frame" x="0.0" y="0.0" width="375" height="324"/> <rect key="frame" x="0.0" y="0.0" width="375" height="328.5"/>
<subviews> <subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AQj-UW-fvt" userLabel="BackBtn"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AQj-UW-fvt" userLabel="BackBtn">
<rect key="frame" x="16" y="16" width="44" height="44"/> <rect key="frame" x="16" y="16" width="44" height="44"/>
@ -59,32 +59,32 @@
<action selector="backBtnTapped:" destination="a6e-KY-ZKO" eventType="touchUpInside" id="5hu-by-Bp7"/> <action selector="backBtnTapped:" destination="a6e-KY-ZKO" eventType="touchUpInside" id="5hu-by-Bp7"/>
</connections> </connections>
</button> </button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Upload your information" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3zY-su-fK0"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Upload your information" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3zY-su-fK0">
<rect key="frame" x="32" y="56" width="311" height="29"/> <rect key="frame" x="32" y="56" width="311" height="33.5"/>
<accessibility key="accessibilityConfiguration"> <accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" staticText="YES" header="YES"/> <accessibilityTraits key="traits" staticText="YES" header="YES"/>
</accessibility> </accessibility>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/> <fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ft1-PF-Epb"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ft1-PF-Epb">
<rect key="frame" x="32" y="101" width="295.5" height="86"/> <rect key="frame" x="32" y="105.5" width="301" height="86.5"/>
<string key="text">A state or territory health official will send a PIN to your device via text message. Enter it below to upload your information.</string> <string key="text">A state or territory health official will send a PIN to your device via text message. Enter it below to upload your information.</string>
<fontDescription key="fontDescription" type="system" pointSize="18"/> <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mKA-1q-WgQ" customClass="CodeInputView" customModule="COVIDSafe" customModuleProvider="target"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mKA-1q-WgQ" customClass="CodeInputView" customModule="COVIDSafe" customModuleProvider="target">
<rect key="frame" x="26" y="203" width="317" height="54"/> <rect key="frame" x="26" y="208" width="317" height="54"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="54" id="GTp-b5-upv"/> <constraint firstAttribute="height" constant="54" id="GTp-b5-upv"/>
</constraints> </constraints>
</view> </view>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Invalid PIN, please ask the health official to send you another PIN." textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zkm-8z-rno"> <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Invalid PIN, please ask the health official to send you another PIN." textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zkm-8z-rno">
<rect key="frame" x="32" y="265" width="311" height="43"/> <rect key="frame" x="32" y="270" width="311" height="42.5"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/> <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" red="0.63921568627450975" green="0.098039215686274508" blue="0.098039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.63921568627450975" green="0.098039215686274508" blue="0.098039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
@ -123,7 +123,7 @@
<constraints> <constraints>
<constraint firstAttribute="height" constant="48" id="aN0-ip-CM7"/> <constraint firstAttribute="height" constant="48" id="aN0-ip-CM7"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/> <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
<color key="tintColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="tintColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Upload my information"> <state key="normal" title="Upload my information">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -136,14 +136,14 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vMG-6j-hyZ"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vMG-6j-hyZ">
<rect key="frame" x="32" y="145" width="311" height="377"/> <rect key="frame" x="32" y="145" width="311" height="377.5"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uKh-zc-OXM"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uKh-zc-OXM">
<rect key="frame" x="0.0" y="291" width="311" height="86"/> <rect key="frame" x="0.0" y="291" width="311" height="86.5"/>
<string key="text">Your COVIDSafe information is currently being uploaded. <string key="text">Your COVIDSafe information is currently being uploaded.
Please do not close the app.</string> Please do not close the app.</string>
<fontDescription key="fontDescription" type="system" pointSize="18"/> <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
@ -242,7 +242,7 @@ Please do not close the app.</string>
</connections> </connections>
</button> </button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hkA-4k-if8"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hkA-4k-if8">
<rect key="frame" x="32" y="102.5" width="311" height="462"/> <rect key="frame" x="32" y="103" width="311" height="461.5"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="CovidSafe-Circle-Black" translatesAutoresizingMaskIntoConstraints="NO" id="cih-JQ-a0F"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="CovidSafe-Circle-Black" translatesAutoresizingMaskIntoConstraints="NO" id="cih-JQ-a0F">
<rect key="frame" x="40" y="0.0" width="231" height="231"/> <rect key="frame" x="40" y="0.0" width="231" height="231"/>
@ -250,19 +250,19 @@ Please do not close the app.</string>
<constraint firstAttribute="width" secondItem="cih-JQ-a0F" secondAttribute="height" multiplier="1:1" id="Kfm-4r-ACZ"/> <constraint firstAttribute="width" secondItem="cih-JQ-a0F" secondAttribute="height" multiplier="1:1" id="Kfm-4r-ACZ"/>
</constraints> </constraints>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="An error occurred while uploading your information, please try again." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JgG-df-SWA"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="An error occurred while uploading your information, please try again." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JgG-df-SWA">
<rect key="frame" x="0.0" y="291" width="311" height="43"/> <rect key="frame" x="0.0" y="291" width="311" height="42.5"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/> <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sEL-Fh-3RO" customClass="GradientButton" customModule="COVIDSafe" customModuleProvider="target"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sEL-Fh-3RO" customClass="GradientButton" customModule="COVIDSafe" customModuleProvider="target">
<rect key="frame" x="0.0" y="358" width="311" height="48"/> <rect key="frame" x="0.0" y="357.5" width="311" height="48"/>
<color key="backgroundColor" red="0.0" green="0.40000000000000002" blue="0.1058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.0" green="0.40000000000000002" blue="0.1058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="48" id="8ao-HW-u9m"/> <constraint firstAttribute="height" constant="48" id="8ao-HW-u9m"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/> <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
<color key="tintColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="tintColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Try again"> <state key="normal" title="Try again">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -273,12 +273,12 @@ Please do not close the app.</string>
</connections> </connections>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="d3A-71-AFA" customClass="GradientButton" customModule="COVIDSafe" customModuleProvider="target"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="d3A-71-AFA" customClass="GradientButton" customModule="COVIDSafe" customModuleProvider="target">
<rect key="frame" x="0.0" y="414" width="311" height="48"/> <rect key="frame" x="0.0" y="413.5" width="311" height="48"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="48" id="A91-Cr-mRZ"/> <constraint firstAttribute="height" constant="48" id="A91-Cr-mRZ"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
<color key="tintColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="tintColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Cancel"> <state key="normal" title="Cancel">
<color key="titleColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="titleColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -356,23 +356,23 @@ Please do not close the app.</string>
<constraint firstAttribute="width" secondItem="E3m-3P-jjw" secondAttribute="height" multiplier="311:188" id="5OB-nO-g1C"/> <constraint firstAttribute="width" secondItem="E3m-3P-jjw" secondAttribute="height" multiplier="311:188" id="5OB-nO-g1C"/>
</constraints> </constraints>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Is a health official asking you to upload your information?" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YGP-gN-IjT"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Is a health official asking you to upload your information?" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YGP-gN-IjT">
<rect key="frame" x="32" y="268" width="311" height="57.5"/> <rect key="frame" x="32" y="268" width="311" height="101.5"/>
<accessibility key="accessibilityConfiguration"> <accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" staticText="YES" header="YES"/> <accessibilityTraits key="traits" staticText="YES" header="YES"/>
</accessibility> </accessibility>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/> <fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" delaysContentTouches="NO" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="tqv-D9-PS3"> <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" delaysContentTouches="NO" editable="NO" textAlignment="natural" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tqv-D9-PS3">
<rect key="frame" x="32" y="341.5" width="311" height="188"/> <rect key="frame" x="32" y="385.5" width="311" height="192"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<string key="text">Only if you test positive to COVID-19 will a state or territory health official contact you to assist with voluntary upload of your information. <string key="text">Only if you test positive to COVID-19 will a state or territory health official contact you to assist with voluntary upload of your information.
Once you press Yes youll need to provide consent to upload your information. </string> Once you press Yes youll need to provide consent to upload your information. </string>
<color key="textColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/> <color key="textColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/> <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView> </textView>
</subviews> </subviews>
@ -407,7 +407,7 @@ Once you press Yes youll need to provide consent to upload your informa
<constraints> <constraints>
<constraint firstAttribute="height" constant="48" id="66Z-n2-IEN"/> <constraint firstAttribute="height" constant="48" id="66Z-n2-IEN"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/> <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
<color key="tintColor" red="0.0" green="0.54117647058823526" blue="0.13725490196078433" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="tintColor" red="0.0" green="0.54117647058823526" blue="0.13725490196078433" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="No"> <state key="normal" title="No">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -427,7 +427,7 @@ Once you press Yes youll need to provide consent to upload your informa
<constraints> <constraints>
<constraint firstAttribute="height" constant="48" id="WjV-Sg-A9T"/> <constraint firstAttribute="height" constant="48" id="WjV-Sg-A9T"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/> <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
<color key="tintColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="tintColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Yes"> <state key="normal" title="Yes">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -475,49 +475,29 @@ Once you press Yes youll need to provide consent to upload your informa
<rect key="frame" x="0.0" y="0.0" width="375" height="587"/> <rect key="frame" x="0.0" y="0.0" width="375" height="587"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qdE-ta-9is" userLabel="ContentView"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qdE-ta-9is" userLabel="ContentView">
<rect key="frame" x="0.0" y="0.0" width="375" height="475"/> <rect key="frame" x="0.0" y="0.0" width="375" height="485.5"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Upload Consent" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ecY-RE-ssa"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Upload Consent" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ecY-RE-ssa">
<rect key="frame" x="32" y="56" width="311" height="29"/> <rect key="frame" x="32" y="56" width="311" height="33.5"/>
<accessibility key="accessibilityConfiguration"> <accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" staticText="YES" header="YES"/> <accessibilityTraits key="traits" staticText="YES" header="YES"/>
</accessibility> </accessibility>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/> <fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" delaysContentTouches="NO" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="ryL-BN-XeS"> <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" delaysContentTouches="NO" editable="NO" textAlignment="natural" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ryL-BN-XeS">
<rect key="frame" x="32" y="101" width="311" height="274"/> <rect key="frame" x="32" y="105.5" width="311" height="280"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<string key="text">Unless you consent, your close contact information will not be uploaded. <string key="text">Unless you consent, your close contact information will not be uploaded.
If you consent, your close contact information will be uploaded and shared with state or territory health officials for contact tracing purposes. If you consent, your close contact information will be uploaded and shared with state or territory health officials for contact tracing purposes.
Read the COVIDSafe *privacy policy* for further details.</string> Read the COVIDSafe *privacy policy* for further details.Select 'I agree' to confirm consent.</string>
<color key="textColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/> <color key="textColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/> <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView> </textView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mzh-IB-Sem" userLabel="ConsentButton">
<rect key="frame" x="32" y="391" width="24" height="24"/>
<accessibility key="accessibilityConfiguration" hint="Check to consent" label="I consent checkbox, unchecked">
<accessibilityTraits key="traits" none="YES"/>
</accessibility>
<constraints>
<constraint firstAttribute="height" constant="24" id="FJs-ZV-f7s"/>
<constraint firstAttribute="width" constant="24" id="rSd-43-LYy"/>
</constraints>
<state key="normal" image="emptyCheckbox"/>
<connections>
<action selector="onCheckboxTappedWithSender:" destination="GKP-u6-wgj" eventType="touchUpInside" id="XLU-ww-42R"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="I consent to upload my information." textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oFl-H4-sBC">
<rect key="frame" x="64" y="392.5" width="291" height="21.5"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="c1v-Px-kY5"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="c1v-Px-kY5">
<rect key="frame" x="16" y="16" width="44" height="44"/> <rect key="frame" x="16" y="16" width="44" height="44"/>
<accessibility key="accessibilityConfiguration" label="back"/> <accessibility key="accessibilityConfiguration" label="back"/>
@ -535,17 +515,12 @@ Read the COVIDSafe *privacy policy* for further details.</string>
<accessibility key="accessibilityConfiguration" label="ContentView"/> <accessibility key="accessibilityConfiguration" label="ContentView"/>
<constraints> <constraints>
<constraint firstAttribute="bottom" secondItem="ryL-BN-XeS" secondAttribute="bottom" constant="100" id="4JN-hN-SHZ"/> <constraint firstAttribute="bottom" secondItem="ryL-BN-XeS" secondAttribute="bottom" constant="100" id="4JN-hN-SHZ"/>
<constraint firstItem="oFl-H4-sBC" firstAttribute="centerY" secondItem="mzh-IB-Sem" secondAttribute="centerY" id="8rb-lu-PZe"/>
<constraint firstItem="ecY-RE-ssa" firstAttribute="top" secondItem="qdE-ta-9is" secondAttribute="top" constant="56" id="9pa-0O-gf7"/> <constraint firstItem="ecY-RE-ssa" firstAttribute="top" secondItem="qdE-ta-9is" secondAttribute="top" constant="56" id="9pa-0O-gf7"/>
<constraint firstItem="mzh-IB-Sem" firstAttribute="leading" secondItem="qdE-ta-9is" secondAttribute="leading" constant="32" id="E0b-LR-GgB"/>
<constraint firstAttribute="trailing" secondItem="ecY-RE-ssa" secondAttribute="trailing" constant="32" id="O5O-Q5-L92"/> <constraint firstAttribute="trailing" secondItem="ecY-RE-ssa" secondAttribute="trailing" constant="32" id="O5O-Q5-L92"/>
<constraint firstItem="ecY-RE-ssa" firstAttribute="leading" secondItem="qdE-ta-9is" secondAttribute="leading" constant="32" id="RA6-hI-Six"/> <constraint firstItem="ecY-RE-ssa" firstAttribute="leading" secondItem="qdE-ta-9is" secondAttribute="leading" constant="32" id="RA6-hI-Six"/>
<constraint firstItem="c1v-Px-kY5" firstAttribute="leading" secondItem="qdE-ta-9is" secondAttribute="leading" constant="16" id="Utd-IG-kxz"/> <constraint firstItem="c1v-Px-kY5" firstAttribute="leading" secondItem="qdE-ta-9is" secondAttribute="leading" constant="16" id="Utd-IG-kxz"/>
<constraint firstItem="ryL-BN-XeS" firstAttribute="top" secondItem="ecY-RE-ssa" secondAttribute="bottom" constant="16" id="am7-Xb-QHu"/> <constraint firstItem="ryL-BN-XeS" firstAttribute="top" secondItem="ecY-RE-ssa" secondAttribute="bottom" constant="16" id="am7-Xb-QHu"/>
<constraint firstAttribute="trailing" secondItem="oFl-H4-sBC" secondAttribute="trailing" constant="20" id="ct0-bb-7J5"/>
<constraint firstItem="mzh-IB-Sem" firstAttribute="top" secondItem="ryL-BN-XeS" secondAttribute="bottom" constant="16" id="epY-4R-ShR"/>
<constraint firstItem="ecY-RE-ssa" firstAttribute="trailing" secondItem="ryL-BN-XeS" secondAttribute="trailing" id="mnw-ZK-UUm"/> <constraint firstItem="ecY-RE-ssa" firstAttribute="trailing" secondItem="ryL-BN-XeS" secondAttribute="trailing" id="mnw-ZK-UUm"/>
<constraint firstItem="oFl-H4-sBC" firstAttribute="leading" secondItem="mzh-IB-Sem" secondAttribute="trailing" constant="8" id="oKJ-7K-JtO"/>
<constraint firstItem="c1v-Px-kY5" firstAttribute="top" secondItem="qdE-ta-9is" secondAttribute="top" constant="16" id="x19-vw-sBZ"/> <constraint firstItem="c1v-Px-kY5" firstAttribute="top" secondItem="qdE-ta-9is" secondAttribute="top" constant="16" id="x19-vw-sBZ"/>
<constraint firstItem="ryL-BN-XeS" firstAttribute="leading" secondItem="ecY-RE-ssa" secondAttribute="leading" id="xD8-sP-05a"/> <constraint firstItem="ryL-BN-XeS" firstAttribute="leading" secondItem="ecY-RE-ssa" secondAttribute="leading" id="xD8-sP-05a"/>
</constraints> </constraints>
@ -559,16 +534,16 @@ Read the COVIDSafe *privacy policy* for further details.</string>
<constraint firstAttribute="bottom" secondItem="qdE-ta-9is" secondAttribute="bottom" id="zqI-pE-geo"/> <constraint firstAttribute="bottom" secondItem="qdE-ta-9is" secondAttribute="bottom" id="zqI-pE-geo"/>
</constraints> </constraints>
</scrollView> </scrollView>
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="huH-hW-8ZB" customClass="GradientButton" customModule="COVIDSafe" customModuleProvider="target"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="huH-hW-8ZB" customClass="GradientButton" customModule="COVIDSafe" customModuleProvider="target">
<rect key="frame" x="32" y="587" width="311" height="48"/> <rect key="frame" x="32" y="587" width="311" height="48"/>
<color key="backgroundColor" red="0.0" green="0.40000000000000002" blue="0.1058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.0" green="0.40000000000000002" blue="0.1058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" hint="please consent to proceed"/> <accessibility key="accessibilityConfiguration" hint="please consent to proceed"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="48" id="1pW-Jb-2mj"/> <constraint firstAttribute="height" constant="48" id="1pW-Jb-2mj"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/> <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
<color key="tintColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="tintColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Continue"> <state key="normal" title="I agree">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state> </state>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>
@ -596,8 +571,6 @@ Read the COVIDSafe *privacy policy* for further details.</string>
<navigationItem key="navigationItem" id="uNC-rC-MF2"/> <navigationItem key="navigationItem" id="uNC-rC-MF2"/>
<nil key="simulatedBottomBarMetrics"/> <nil key="simulatedBottomBarMetrics"/>
<connections> <connections>
<outlet property="agreeButton" destination="huH-hW-8ZB" id="BWW-PT-FxQ"/>
<outlet property="consentCheckBox" destination="mzh-IB-Sem" id="9z7-AI-snh"/>
<outlet property="messageTextView" destination="ryL-BN-XeS" id="Ypb-kY-GQH"/> <outlet property="messageTextView" destination="ryL-BN-XeS" id="Ypb-kY-GQH"/>
</connections> </connections>
</viewController> </viewController>
@ -627,7 +600,7 @@ Read the COVIDSafe *privacy policy* for further details.</string>
<rect key="frame" x="0.0" y="0.0" width="375" height="586"/> <rect key="frame" x="0.0" y="0.0" width="375" height="586"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0tB-vW-7YF" userLabel="ContentView"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0tB-vW-7YF" userLabel="ContentView">
<rect key="frame" x="0.0" y="0.0" width="375" height="483"/> <rect key="frame" x="0.0" y="0.0" width="375" height="531.5"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Upload_Success" translatesAutoresizingMaskIntoConstraints="NO" id="TcN-eU-PuH"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Upload_Success" translatesAutoresizingMaskIntoConstraints="NO" id="TcN-eU-PuH">
<rect key="frame" x="32" y="0.0" width="311" height="160"/> <rect key="frame" x="32" y="0.0" width="311" height="160"/>
@ -636,29 +609,22 @@ Read the COVIDSafe *privacy policy* for further details.</string>
</constraints> </constraints>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Thank you for helping to stop the spread of COVID-19!" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="C1n-tc-aEy"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Thank you for helping to stop the spread of COVID-19!" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="C1n-tc-aEy">
<rect key="frame" x="32" y="192" width="311" height="57.5"/> <rect key="frame" x="32" y="192" width="311" height="101.5"/>
<accessibility key="accessibilityConfiguration"> <accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" staticText="YES" header="YES"/> <accessibilityTraits key="traits" staticText="YES" header="YES"/>
</accessibility> </accessibility>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/> <fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" delaysContentTouches="NO" editable="NO" usesAttributedText="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bP5-GQ-GQk"> <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" delaysContentTouches="NO" editable="NO" textAlignment="natural" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bP5-GQ-GQk">
<rect key="frame" x="32" y="265.5" width="311" height="209.5"/> <rect key="frame" x="32" y="309.5" width="311" height="214"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<attributedString key="attributedText"> <string key="text">You have successfully uploaded your information to the COVIDSafe highly secure storage system.
<fragment>
<string key="content">You have successfully uploaded your information to the COVIDSafe highly secure storage system.
State or territory health officials will notify other COVIDSafe users that have recorded instances of close contact with you. Your identity will remain anonymous to other users.</string> State or territory health officials will notify other COVIDSafe users that have recorded instances of close contact with you. Your identity will remain anonymous to other users.</string>
<attributes> <color key="textColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="NSColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/> <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<font key="NSFont" metaFont="system" size="18"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView> </textView>
</subviews> </subviews>
@ -691,7 +657,7 @@ State or territory health officials will notify other COVIDSafe users that have
<constraints> <constraints>
<constraint firstAttribute="height" constant="49" id="gDg-cR-S0i"/> <constraint firstAttribute="height" constant="49" id="gDg-cR-S0i"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/> <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
<color key="tintColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="tintColor" red="0.0" green="0.54117647059999996" blue="0.13725490200000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Continue"> <state key="normal" title="Continue">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -731,6 +697,5 @@ State or territory health officials will notify other COVIDSafe users that have
<image name="Upload_Success" width="311" height="188"/> <image name="Upload_Success" width="311" height="188"/>
<image name="arrow-left" width="24" height="24"/> <image name="arrow-left" width="24" height="24"/>
<image name="closeButton" width="24" height="24"/> <image name="closeButton" width="24" height="24"/>
<image name="emptyCheckbox" width="24" height="24"/>
</resources> </resources>
</document> </document>

View file

@ -5,15 +5,10 @@ import UIKit
final class UploadDataHomeViewController: UIViewController { final class UploadDataHomeViewController: UIViewController {
@IBOutlet var messageTextView: UITextView! @IBOutlet var messageTextView: UITextView!
@IBOutlet weak var consentCheckBox: UIButton!
@IBOutlet weak var agreeButton: UIButton!
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
consentCheckBox.setImage(UIImage(named: "emptyCheckbox"), for: .normal)
consentCheckBox.setImage(UIImage(named: "selectedCheckbox"), for: .selected)
setupMessageTextView() setupMessageTextView()
updateContinueButton()
} }
private func setupMessageTextView() { private func setupMessageTextView() {
@ -21,22 +16,7 @@ final class UploadDataHomeViewController: UIViewController {
messageTextView.addLink("https://www.health.gov.au/using-our-websites/privacy/privacy-notice-for-covidsafe-app", enclosedIn: "*") messageTextView.addLink("https://www.health.gov.au/using-our-websites/privacy/privacy-notice-for-covidsafe-app", enclosedIn: "*")
} }
@IBAction func onCheckboxTapped(sender: UIButton) {
sender.isSelected = !sender.isSelected
self.agreeButton.isEnabled = sender.isSelected
updateContinueButton()
consentCheckBox.accessibilityLabel = sender.isSelected ? "I consent checkbox, checked" : "I consent checkbox, unchecked"
}
@IBAction func onBackTapped(_ sender: UIButton) { @IBAction func onBackTapped(_ sender: UIButton) {
navigationController?.popViewController(animated: true) navigationController?.popViewController(animated: true)
} }
func updateContinueButton() {
if (agreeButton.isEnabled) {
agreeButton.backgroundColor = UIColor.covidSafeButtonDarkerColor
} else {
agreeButton.backgroundColor = UIColor(0xDBDDDD)
}
}
} }

View file

@ -32,8 +32,8 @@ class UploadDataStep2VC: UIViewController, CodeInputViewDelegate {
var currentKeyboardFrame: CGRect? var currentKeyboardFrame: CGRect?
var uploadAnimatedView: AnimationView? var uploadAnimatedView: AnimationView?
let uploadFailErrMsg = "Upload failed. Please try again later." let uploadFailErrMsg = NSLocalizedString("UploadFailed", comment: "Upload failed. Please try again later.")
let invalidPinErrMsg = "Invalid PIN, please ask the health official to send you another PIN." let invalidPinErrMsg = NSLocalizedString("InvalidPIN", comment: "Invalid PIN, please ask health official to send another PIN.")
let verifyEnabledColor = UIColor.covidSafeButtonDarkerColor let verifyEnabledColor = UIColor.covidSafeButtonDarkerColor
let verifyDisabledColor = UIColor(red: 219/255.0, green: 221/255.0, blue: 221.0/255.0, alpha: 1.0) let verifyDisabledColor = UIColor(red: 219/255.0, green: 221/255.0, blue: 221.0/255.0, alpha: 1.0)
@ -165,10 +165,10 @@ class UploadDataStep2VC: UIViewController, CodeInputViewDelegate {
} }
func displayUploadDataError() { func displayUploadDataError() {
let errorAlert = UIAlertController(title: "Upload failed", let errorAlert = UIAlertController(title: NSLocalizedString("UploadFailedErrorTitle", comment: "Upload Failed"),
message: "Please try again later.", message: NSLocalizedString("UploadFailedErrorMessage", comment: "Please try again later."),
preferredStyle: .alert) preferredStyle: .alert)
errorAlert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil)) errorAlert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "OK"), style: .default, handler: nil))
self.present(errorAlert, animated: true) self.present(errorAlert, animated: true)
} }

View file

@ -0,0 +1,71 @@
/*
Localizable.strings
CovidSafe
Copyright © 2020 Australian Government. All rights reserved.
*/
//Global
"OK" = "OK";
// OTP View Controller
"EnterPINSent" = "Enter the PIN sent to %@";
"PINWillExpire" = "Your PIN will expire in %@";
"CodeHasExpired" = "Your code has expired.";
"InvalidOTP" = "Must be a 6-digit code";
"WrongOTP" = "Wrong PIN entered";
"IsThisNumberWrong" = "Is this mobile number wrong?";
"ResendPin" = "Resend PIN";
"ReceivePinIssue" = "Issues receiving your PIN?";
"PhoneVerificationErrorTitle" = "Error verifying phone number";
"PhoneVerificationErrorMessage" = "Please check your details and try again.";
"PhoneNumberFormatErrorTitle" = "Wrong number format";
"PhoneNumberFormatErrorMessage" = "Please enter a mobile phone number.";
//Phone Number View Controller
"EnterPhoneReVerify" = "Enter your mobile number to re-verify";
"AusPhoneNumberButton" = "Use an Australian phone number";
// Home View Controller
"PairingRequestsInfo" = "COVIDSafe does not send pairing requests.";
"PairingRequestsInfoUnderline" = "pairing requests";
"InformationUploaded" = "Your information was uploaded on %@";
"VersionNumber" = "Version number: %@ Build: %@";
"HomeHeaderNoAction" = "COVIDSafe is active.\nNo further action is required.";
"HomeHeaderPermissions" = "COVIDSafe is not active.\nCheck your permissions.";
"NotificationsEnabled" = "Notifications are enabled";
"NotificationsDisabled" = "Notifications are disabled";
"NotificationsEnabledBlurb" = "You will receive a notification if COVIDSafe is not active. Change notification settings";
"NotificationsDisabledBlurb" = "You will not receive a notification if COVIDSafe is not active. Change notification settings";
"NotificationsBlurbLink" = "Change notification settings";
"ShareText" = "Join me in stopping the spread of COVID-19! Download COVIDSafe, an app from the Australian Government.";
//Successful registration (OnboardingStep2B)
"PointOne" = "1. When you leave home, keep your phone with you and make sure COVIDSafe is active.";
"PointTwo" = "2. Bluetooth® should be kept ON.";
"PointThree" = "3. COVIDSafe does not send pairing requests. Learn more.";
"PointThreeUnderline" = "Learn more";
// Help Nav Controller
"ReportAnIssue" = "Report an issue";
// Personal Details View Controller
"Done" = "Done";
"Next" = "Next";
"ValidationError" = "Validation error";
"PostcodeValidationErrorMessage" = "Please enter a valid postcode";
//Upload Data Step 2 View Controller
"UploadFailed" = "Upload failed. Please try again later.";
"InvalidPIN" = "Invalid PIN, please ask the health official to send you another PIN.";
"UploadFailedErrorTitle" = "Upload Failed";
"UploadFailedErrorMessage" = "Please try again later.";
// Unused
"WrongNumber" = "Wrong number?";
"ResendCode" = "Resend PIN";
"NotAValidCode" = "Not a valid code";
"DataUploaded" = "Data uploaded";
"DataNotUploaded" = "Data not uploaded";