From 084508fe29ec0501561d22847cfb42b077e51b5f Mon Sep 17 00:00:00 2001 From: alexchornyi <85160203+alexchornyi@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:05:58 +0300 Subject: [PATCH] fixed to work with new hcert sections (#98) * fixed wallet to work with new hcert sections * fixed dev team Co-authored-by: Alexandr Chernyy --- DGCAWallet.xcodeproj/project.pbxproj | 4 ++-- .../xcshareddata/swiftpm/Package.resolved | 6 +++--- DGCAWallet/Models/LocalData.swift | 2 +- .../SupportingFiles/en.lproj/Localizable.strings | 6 ++++-- .../ViewControllers/RuleValidationResultVC.swift | 13 ++++++++----- .../ViewControllers/RuleValidationResultVC.xib | 4 ++-- 6 files changed, 20 insertions(+), 15 deletions(-) diff --git a/DGCAWallet.xcodeproj/project.pbxproj b/DGCAWallet.xcodeproj/project.pbxproj index ca6bcbe..9ea7ac8 100644 --- a/DGCAWallet.xcodeproj/project.pbxproj +++ b/DGCAWallet.xcodeproj/project.pbxproj @@ -894,7 +894,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = 9FH6TNGWF2; INFOPLIST_FILE = DGCAWallet/SupportingFiles/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.1; @@ -918,7 +918,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = 9FH6TNGWF2; INFOPLIST_FILE = DGCAWallet/SupportingFiles/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.1; diff --git a/DGCAWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DGCAWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 13a9f84..f80508f 100644 --- a/DGCAWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DGCAWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -33,7 +33,7 @@ "repositoryURL": "https://github.com/eu-digital-green-certificates/dgca-app-core-ios", "state": { "branch": "main", - "revision": "46385827a9bc23694a55eecf2bb01d895c6e8923", + "revision": "689a6e3da11bd163862b4c0168156d89c780a123", "version": null } }, @@ -51,8 +51,8 @@ "repositoryURL": "https://github.com/eu-digital-green-certificates/json-logic-swift.git", "state": { "branch": null, - "revision": "6c04fa0ccfcd8424986aaf2fc61ea458b3979cf1", - "version": "1.1.6" + "revision": "8dc339147b27ae633a1857503ed8d091c7935d0d", + "version": "1.1.5" } }, { diff --git a/DGCAWallet/Models/LocalData.swift b/DGCAWallet/Models/LocalData.swift index 58f1267..efca688 100644 --- a/DGCAWallet/Models/LocalData.swift +++ b/DGCAWallet/Models/LocalData.swift @@ -34,7 +34,7 @@ struct DatedCertString: Codable { var certString: String var storedTAN: String? var cert: HCert? { - HCert(from: certString) + HCert(from: certString, applicationType: .wallet) } } diff --git a/DGCAWallet/SupportingFiles/en.lproj/Localizable.strings b/DGCAWallet/SupportingFiles/en.lproj/Localizable.strings index e92472d..a85e2ac 100644 --- a/DGCAWallet/SupportingFiles/en.lproj/Localizable.strings +++ b/DGCAWallet/SupportingFiles/en.lproj/Localizable.strings @@ -61,11 +61,13 @@ "destination_country" = "Your destination country"; "destination_date" = "Check the date"; "valid_certificate" = "Valid certificate"; -"your_certificate_allow" = "Your certificate allows you to enter the chosen country"; +"your_certificate_allow" = "Your certificate is valid and confirms to the provided country rules. Additional entry requirements might apply, please refer to the Re-open EU website: https://reopen.europa.eu/"; "invalid_certificate" = "Invalid certificate"; "your_certificate_did_not_allow" = "Your certificate did not allows you to enter the chosen country"; "certificate_limitation" = "Certificate has limitation"; "certification_has_limitation" = "Your certificate is valid but has the following restrictions:"; "validate_certificate_with_rules" = "Validating certificate with country rules"; "please_wait" = "Please wait we are validating your certificate"; -"info_without_waranty" = "Please note that this information is without guaranty. This functions checks if the certificate matches the rules of the country you are travelling to at the given date."; +"info_without_waranty" = "This check gives an indication on eligibility to travel based on your certificate. Restriction of free movement in response to the coronavirus pandemic are subject to change and might be based on additional information not available to and within this application."; +"issuer.country" = "Issuer Country"; +"test.type" = "Type of Test"; diff --git a/DGCAWallet/ViewControllers/RuleValidationResultVC.swift b/DGCAWallet/ViewControllers/RuleValidationResultVC.swift index c69fbd6..84e9b80 100644 --- a/DGCAWallet/ViewControllers/RuleValidationResultVC.swift +++ b/DGCAWallet/ViewControllers/RuleValidationResultVC.swift @@ -98,16 +98,19 @@ final class RuleValidationResultVC: UIViewController { resultIcon.isHidden = false tableView.isHidden = false noWarrantyLabel.isHidden = false + resultDescriptionLabel.sizeToFit() + noWarrantyLabel.sizeToFit() } } extension RuleValidationResultVC: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - if items.count == 0 { - self.tableView.setEmptyMessage("Sorry! \n no rules for this country") - } else { - self.tableView.restore() - } + // Please uncomment this if you need to show message about no rules for selected country +// if items.count == 0 { +// self.tableView.setEmptyMessage("Sorry! \n no rules for this country") +// } else { +// self.tableView.restore() +// } return items.count } func numberOfSections(in tableView: UITableView) -> Int { diff --git a/DGCAWallet/ViewControllers/RuleValidationResultVC.xib b/DGCAWallet/ViewControllers/RuleValidationResultVC.xib index 1527b39..fe37e5f 100644 --- a/DGCAWallet/ViewControllers/RuleValidationResultVC.xib +++ b/DGCAWallet/ViewControllers/RuleValidationResultVC.xib @@ -73,7 +73,7 @@