Skip to content

Commit a7987a2

Browse files
PaulBallmannihorkhomyakDenyam
authored
Feature/dev revocation (#129)
* Replaced localized strings * Merge branch 'feature/development-verifier' of https://github.com/eu-digital-green-certificates/dgca-verifier-app-ios into feature/development-verifier * 'feature/development-verifier' of https://github.com/eu-digital-green-certificates/dgca-verifier-app-ios: Replaced localized strings Feature/development verifier (#123) # Conflicts: # DGCAVerifier.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved # DGCAVerifier/Components/DebugCells/DebugCell.swift # DGCAVerifier/Components/FullFloatingPanelLayout.swift # DGCAVerifier/Components/SelfSizedTableView.swift # DGCAVerifier/Models/DebugSectionModel.swift # DGCAVerifier/SupportingFiles/de.lproj/InfoPlist.strings # DGCAVerifier/SupportingFiles/de.lproj/Localizable.strings # DGCAVerifier/SupportingFiles/en.lproj/InfoPlist.strings * Added revocation request engine to project. Updated local storage, updated loading * Fixed dismissing of controllers * Added Revocation request * Added Revocation and Partition requests * Added chunk request * Fixed parameter in call * Uncompressing chunks response * added chunk request * Added zip loading * Added Updating database, added UI * Fixed save safa thread * Added UI screens for loading * Added Revocation Functionality * minor * Imported BloomFilter * Fixed Bloom filter * Removed completion from background method, fixed crash with no slice data * Changes status x, y in Partitions * minor changes in database * Fixed Notifications * Added reload revocation after 404 * Added slice check on bloom type * Updated classes text * Added UI for revocation * Updated validity * removed code style file * Added activity wheel to activity alert * Fixed loading * Test target (with not broken build) for revocation Co-authored-by: IgorKhomiak <ihorkhomyak@gmail.com> Co-authored-by: Denis Melenevsky <denys.melenevskyi@globallogic.com>
1 parent 4303593 commit a7987a2

File tree

43 files changed

+2817
-1465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2817
-1465
lines changed

DGCAVerifier.xcodeproj/project.pbxproj

Lines changed: 245 additions & 47 deletions
Large diffs are not rendered by default.

DGCAVerifier.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 41 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DGCAVerifier.xcodeproj/xcshareddata/xcschemes/DGCAVerifier.xcscheme

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
shouldUseLaunchSchemeArgsEnv = "YES">
3030
<Testables>
3131
<TestableReference
32-
skipped = "NO">
32+
skipped = "YES">
3333
<BuildableReference
3434
BuildableIdentifier = "primary"
3535
BlueprintIdentifier = "CEA6D6FD261F8D2900715333"
@@ -39,7 +39,7 @@
3939
</BuildableReference>
4040
</TestableReference>
4141
<TestableReference
42-
skipped = "NO">
42+
skipped = "YES">
4343
<BuildableReference
4444
BuildableIdentifier = "primary"
4545
BlueprintIdentifier = "CEA6D708261F8D2900715333"
@@ -48,6 +48,26 @@
4848
ReferencedContainer = "container:DGCAVerifier.xcodeproj">
4949
</BuildableReference>
5050
</TestableReference>
51+
<TestableReference
52+
skipped = "NO">
53+
<BuildableReference
54+
BuildableIdentifier = "primary"
55+
BlueprintIdentifier = "D3654ED827C73C48001C8C64"
56+
BuildableName = "com.t-systems.pu-ds.dgca.verifier.tests.xctest"
57+
BlueprintName = "com.t-systems.pu-ds.dgca.verifier.tests"
58+
ReferencedContainer = "container:DGCAVerifier.xcodeproj">
59+
</BuildableReference>
60+
</TestableReference>
61+
<TestableReference
62+
skipped = "NO">
63+
<BuildableReference
64+
BuildableIdentifier = "primary"
65+
BlueprintIdentifier = "D3654EE527C73D84001C8C64"
66+
BuildableName = "DGCAVerifierDOWNLOADTests.xctest"
67+
BlueprintName = "DGCAVerifierDownloadTests"
68+
ReferencedContainer = "container:DGCAVerifier.xcodeproj">
69+
</BuildableReference>
70+
</TestableReference>
5171
</Testables>
5272
</TestAction>
5373
<LaunchAction
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1320"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "CEA6D6E7261F8D2700715333"
18+
BuildableName = "DGCAVerifier.app"
19+
BlueprintName = "DGCAVerifier"
20+
ReferencedContainer = "container:DGCAVerifier.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "D3654EE527C73D84001C8C64"
36+
BuildableName = "DGCAVerifierDownloadTests.xctest"
37+
BlueprintName = "DGCAVerifierDownloadTests"
38+
ReferencedContainer = "container:DGCAVerifier.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
</TestAction>
43+
<LaunchAction
44+
buildConfiguration = "Debug"
45+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
46+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
47+
launchStyle = "0"
48+
useCustomWorkingDirectory = "NO"
49+
ignoresPersistentStateOnLaunch = "NO"
50+
debugDocumentVersioning = "YES"
51+
debugServiceExtension = "internal"
52+
allowLocationSimulation = "YES">
53+
<BuildableProductRunnable
54+
runnableDebuggingMode = "0">
55+
<BuildableReference
56+
BuildableIdentifier = "primary"
57+
BlueprintIdentifier = "CEA6D6E7261F8D2700715333"
58+
BuildableName = "DGCAVerifier.app"
59+
BlueprintName = "DGCAVerifier"
60+
ReferencedContainer = "container:DGCAVerifier.xcodeproj">
61+
</BuildableReference>
62+
</BuildableProductRunnable>
63+
</LaunchAction>
64+
<ProfileAction
65+
buildConfiguration = "Release"
66+
shouldUseLaunchSchemeArgsEnv = "YES"
67+
savedToolIdentifier = ""
68+
useCustomWorkingDirectory = "NO"
69+
debugDocumentVersioning = "YES">
70+
<MacroExpansion>
71+
<BuildableReference
72+
BuildableIdentifier = "primary"
73+
BlueprintIdentifier = "CEA6D6E7261F8D2700715333"
74+
BuildableName = "DGCAVerifier.app"
75+
BlueprintName = "DGCAVerifier"
76+
ReferencedContainer = "container:DGCAVerifier.xcodeproj">
77+
</BuildableReference>
78+
</MacroExpansion>
79+
</ProfileAction>
80+
<AnalyzeAction
81+
buildConfiguration = "Debug">
82+
</AnalyzeAction>
83+
<ArchiveAction
84+
buildConfiguration = "Release"
85+
revealArchiveInOrganizer = "YES">
86+
</ArchiveAction>
87+
</Scheme>

DGCAVerifier/Components/DebugCells/DebugValidationCell.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
* limitations under the License.
1919
* ---license-end
2020
*/
21-
//
21+
//
2222
// DebugValidationCell.swift
2323
// DGCAVerifier
24-
//
24+
//
2525
// Created by Alexandr Chernyy on 07.09.2021.
26-
//
26+
//
2727

2828

2929
import UIKit
@@ -46,7 +46,7 @@ class DebugValidationCell: UITableViewCell {
4646
@IBOutlet weak var destinationView: UILabel!
4747
@IBOutlet weak var travvelerView: UILabel!
4848

49-
private var validityState: ValidityState = .invalid
49+
private var validityState: ValidityState = .validState
5050

5151
func setupCell(with validity: ValidityState) {
5252
self.validityState = validity

DGCAVerifier/Components/Info/RuleErrorCell.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class RuleErrorCell: UITableViewCell {
6868
ruleValueLabel.text = infoItem.header
6969
currentValueLabel.text = infoItem.content
7070
switch infoItem.ruleValidationResult {
71-
case .error:
71+
case .failed:
7272
failedLabel.textColor = .certificateRed
7373
failedLabel.text = "Failed".localized
7474
case .passed:
@@ -81,7 +81,7 @@ class RuleErrorCell: UITableViewCell {
8181

8282
if let countryName = infoItem.countryName {
8383
switch infoItem.ruleValidationResult {
84-
case .error:
84+
case .failed:
8585
resultValueLabel.text = String(format: "Failed for %@ (see settings)".localized, countryName)
8686
case .passed:
8787
resultValueLabel.text = String(format: "Passed for %@ (see settings)".localized, countryName)
@@ -90,7 +90,7 @@ class RuleErrorCell: UITableViewCell {
9090
}
9191
} else {
9292
switch infoItem.ruleValidationResult {
93-
case .error:
93+
case .failed:
9494
resultValueLabel.text = "Failed".localized
9595
case .passed:
9696
resultValueLabel.text = "Passed".localized
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*-
2+
* ---license-start
3+
* eu-digital-green-certificates / dgca-app-core-ios
4+
* ---
5+
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
6+
* ---
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* ---license-end
19+
*/
20+
//
21+
// SquareViewFinder.swift
22+
//
23+
//
24+
// Created by Yannick Spreen on 4/29/21.
25+
//
26+
27+
import UIKit
28+
29+
class SquareViewFinder {
30+
public static func newView(from view: UIView? = nil) -> UIView {
31+
let view = view ?? UIView(frame: .zero)
32+
view.frame = .zero
33+
view.translatesAutoresizingMaskIntoConstraints = false
34+
view.backgroundColor = .clear
35+
view.isUserInteractionEnabled = false
36+
return view
37+
}
38+
39+
static func create(from controller: UIViewController) {
40+
guard let view = controller.view else { return }
41+
42+
let guide = newView()
43+
let square = newView()
44+
let imgTopRight = newView(from: UIImageView(image: UIImage(named: "cam_top_right")))
45+
let imgTopLeft = newView(from: UIImageView(image: UIImage(named: "cam_top_left")))
46+
let imgBottomRight = newView(from: UIImageView(image: UIImage(named: "cam_bottom_right")))
47+
let imgBottomLeft = newView(from: UIImageView(image: UIImage(named: "cam_bottom_left")))
48+
let constraints = [
49+
guide.leadingAnchor.constraint(equalTo: view.leadingAnchor),
50+
guide.trailingAnchor.constraint(equalTo: view.trailingAnchor),
51+
guide.topAnchor.constraint(equalTo: view.topAnchor),
52+
guide.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: 0.53),
53+
square.bottomAnchor.constraint(equalTo: guide.bottomAnchor),
54+
square.centerXAnchor.constraint(equalTo: guide.centerXAnchor),
55+
square.widthAnchor.constraint(equalToConstant: 250),
56+
square.heightAnchor.constraint(equalToConstant: 250),
57+
imgTopRight.topAnchor.constraint(equalTo: square.topAnchor),
58+
imgTopRight.rightAnchor.constraint(equalTo: square.rightAnchor),
59+
imgBottomRight.bottomAnchor.constraint(equalTo: square.bottomAnchor),
60+
imgBottomRight.rightAnchor.constraint(equalTo: square.rightAnchor),
61+
imgBottomLeft.bottomAnchor.constraint(equalTo: square.bottomAnchor),
62+
imgBottomLeft.leftAnchor.constraint(equalTo: square.leftAnchor),
63+
imgTopLeft.topAnchor.constraint(equalTo: square.topAnchor),
64+
imgTopLeft.leftAnchor.constraint(equalTo: square.leftAnchor)
65+
]
66+
for child in [
67+
guide,
68+
square,
69+
imgTopRight,
70+
imgTopLeft,
71+
imgBottomRight,
72+
imgBottomLeft] {
73+
view.addSubview(child)
74+
}
75+
NSLayoutConstraint.activate(constraints)
76+
}
77+
}

0 commit comments

Comments
 (0)