Skip to content

Commit

Permalink
fixed to work with new hcert sections (eu-digital-green-certificates#98)
Browse files Browse the repository at this point in the history
* fixed wallet to work with new hcert sections

* fixed dev team

Co-authored-by: Alexandr Chernyy <[email protected]>
  • Loading branch information
alexchornyi and pingus-nikalex authored Jul 21, 2021
1 parent ffea864 commit 084508f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 15 deletions.
4 changes: 2 additions & 2 deletions DGCAWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
},
Expand All @@ -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"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion DGCAWallet/Models/LocalData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct DatedCertString: Codable {
var certString: String
var storedTAN: String?
var cert: HCert? {
HCert(from: certString)
HCert(from: certString, applicationType: .wallet)
}
}

Expand Down
6 changes: 4 additions & 2 deletions DGCAWallet/SupportingFiles/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";
13 changes: 8 additions & 5 deletions DGCAWallet/ViewControllers/RuleValidationResultVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions DGCAWallet/ViewControllers/RuleValidationResultVC.xib
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z27-xN-xd3">
<rect key="frame" x="16" y="306" width="382" height="70"/>
<constraints>
<constraint firstAttribute="height" constant="70" id="fAY-aK-Eqc"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="70" id="fAY-aK-Eqc"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
Expand All @@ -82,7 +82,7 @@
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="th8-cR-WNX">
<rect key="frame" x="16" y="761" width="382" height="61"/>
<constraints>
<constraint firstAttribute="height" constant="61" id="tAE-gv-xX0"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="61" id="tAE-gv-xX0"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="textColor"/>
Expand Down

0 comments on commit 084508f

Please sign in to comment.