diff --git a/DGCAWallet.xcodeproj/project.pbxproj b/DGCAWallet.xcodeproj/project.pbxproj index 69809a2..4857516 100644 --- a/DGCAWallet.xcodeproj/project.pbxproj +++ b/DGCAWallet.xcodeproj/project.pbxproj @@ -288,6 +288,7 @@ isa = PBXNativeTarget; buildConfigurationList = CEA6D712261F8D2900715333 /* Build configuration list for PBXNativeTarget "DGCAWallet" */; buildPhases = ( + CE17E3342645A0C100029D95 /* ShellScript */, CEA6D6E4261F8D2700715333 /* Sources */, CEA6D6E5261F8D2700715333 /* Frameworks */, CEA6D6E6261F8D2700715333 /* Resources */, @@ -420,6 +421,26 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + CE17E3342645A0C100029D95 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ CEA6D6E4261F8D2700715333 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -634,7 +655,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.t-systems.DGCAWallet.dev"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Debug; }; @@ -654,7 +675,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.t-systems.DGCAWallet.dev"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Release; }; diff --git a/DGCAWallet/Components/FullFloatingPanelLayout.swift b/DGCAWallet/Components/FullFloatingPanelLayout.swift index 184e9e1..235b3a9 100644 --- a/DGCAWallet/Components/FullFloatingPanelLayout.swift +++ b/DGCAWallet/Components/FullFloatingPanelLayout.swift @@ -34,7 +34,7 @@ class FullFloatingPanelLayout: FloatingPanelLayout { var anchors: [FloatingPanelState: FloatingPanelLayoutAnchoring] { let top = FloatingPanelLayoutAnchor(absoluteInset: 16.0, edge: .top, referenceGuide: .safeArea) return [ - .full: top, + .full: top ] } } diff --git a/DGCAWallet/Components/RoundedButton.swift b/DGCAWallet/Components/RoundedButton.swift index 4c03b32..920d2f6 100644 --- a/DGCAWallet/Components/RoundedButton.swift +++ b/DGCAWallet/Components/RoundedButton.swift @@ -29,8 +29,8 @@ import UIKit @IBDesignable class RoundedButton: UIButton { - @IBInspectable var radius: CGFloat = 6.0 { didSet(v) { initialize() } } - @IBInspectable var padding: CGFloat = 4.0 { didSet(v) { initialize() } } + @IBInspectable var radius: CGFloat = 6.0 { didSet(value) { initialize() } } + @IBInspectable var padding: CGFloat = 4.0 { didSet(value) { initialize() } } override init(frame: CGRect) { super.init(frame: frame) diff --git a/DGCAWallet/Extensions/UIColor.swift b/DGCAWallet/Extensions/UIColor.swift index 0da7ebe..177dbce 100644 --- a/DGCAWallet/Extensions/UIColor.swift +++ b/DGCAWallet/Extensions/UIColor.swift @@ -24,7 +24,6 @@ // // Created by Yannick Spreen on 4/29/21. // - import UIKit diff --git a/DGCAWallet/Extensions/UIFont.swift b/DGCAWallet/Extensions/UIFont.swift index e7a3a6d..262ed65 100644 --- a/DGCAWallet/Extensions/UIFont.swift +++ b/DGCAWallet/Extensions/UIFont.swift @@ -29,7 +29,6 @@ import UIKit - extension UIFont { public var weight: UIFont.Weight { guard let weightNumber = traits[.weight] as? NSNumber else { return .regular } diff --git a/DGCAWallet/Extensions/UIViewController.swift b/DGCAWallet/Extensions/UIViewController.swift index 7a28529..f8e853c 100644 --- a/DGCAWallet/Extensions/UIViewController.swift +++ b/DGCAWallet/Extensions/UIViewController.swift @@ -25,7 +25,6 @@ // Created by Yannick Spreen on 5/3/21. // - import UIKit import SwiftDGC @@ -40,12 +39,12 @@ extension UIViewController { handler: ((_ text: String?) -> Void)? = nil ) { let alert = UIAlertController(title: title, message: subtitle, preferredStyle: .alert) - alert.addTextField { (textField:UITextField) in + alert.addTextField { (textField: UITextField) in textField.placeholder = inputPlaceholder textField.keyboardType = inputKeyboardType } - alert.addAction(UIAlertAction(title: actionTitle, style: .default) { action in - guard let textField = alert.textFields?.first else { + alert.addAction(UIAlertAction(title: actionTitle, style: .default) { _ in + guard let textField = alert.textFields?.first else { handler?(nil) return } @@ -65,7 +64,7 @@ extension UIViewController { handler: ((Bool) -> Void)? = nil ) { let alert = UIAlertController(title: title, message: subtitle, preferredStyle: .alert) - alert.addAction(UIAlertAction(title: actionTitle, style: .default) { action in + alert.addAction(UIAlertAction(title: actionTitle, style: .default) { _ in handler?(true) }) if let cancelTitle = cancelTitle { diff --git a/DGCAWallet/Models/LocalData.swift b/DGCAWallet/Models/LocalData.swift index 6f7ff86..6515759 100644 --- a/DGCAWallet/Models/LocalData.swift +++ b/DGCAWallet/Models/LocalData.swift @@ -23,8 +23,7 @@ // DGCAWallet // // Created by Yannick Spreen on 4/25/21. -// - +// import Foundation import SwiftDGC @@ -32,7 +31,7 @@ import SwiftDGC struct DatedCertString: Codable { var date: Date var certString: String - var storedTAN : String? + var storedTAN: String? var cert: HCert? { HCert(from: certString) } diff --git a/DGCAWallet/Protocols/CertViewerDelegate.swift b/DGCAWallet/Protocols/CertViewerDelegate.swift index 085e752..332e9a3 100644 --- a/DGCAWallet/Protocols/CertViewerDelegate.swift +++ b/DGCAWallet/Protocols/CertViewerDelegate.swift @@ -26,6 +26,6 @@ import Foundation -protocol CertViewerDelegate { +protocol CertViewerDelegate: AnyObject { func childDismissed(_ newCertAdded: Bool) } diff --git a/DGCAWallet/Protocols/ChildDismissedDelegate.swift b/DGCAWallet/Protocols/ChildDismissedDelegate.swift index 070f493..837e998 100644 --- a/DGCAWallet/Protocols/ChildDismissedDelegate.swift +++ b/DGCAWallet/Protocols/ChildDismissedDelegate.swift @@ -26,7 +26,7 @@ import Foundation -protocol CertViewerDelegate { +protocol CertViewerDelegate: class { func childDismissed() func openSettings() } diff --git a/DGCAWallet/Services/Brightness.swift b/DGCAWallet/Services/Brightness.swift index be041d2..f5608dd 100644 --- a/DGCAWallet/Services/Brightness.swift +++ b/DGCAWallet/Services/Brightness.swift @@ -24,7 +24,6 @@ // // Created by Yannick Spreen on 4/30/21. // - import Foundation import UIKit diff --git a/DGCAWallet/Services/GatewayConnection.swift b/DGCAWallet/Services/GatewayConnection.swift index 00d239b..55095c0 100644 --- a/DGCAWallet/Services/GatewayConnection.swift +++ b/DGCAWallet/Services/GatewayConnection.swift @@ -39,7 +39,7 @@ struct GatewayConnection { return } // Replace dashes, spaces, etc. and turn into uppercase. - let set = CharacterSet(charactersIn: "0123456789").union(.capitalizedLetters) + let set = CharacterSet(charactersIn: "0123456789").union(.uppercaseLetters) tan = tan.uppercased().components(separatedBy: set.inverted).joined() let tanHash = SHA256.stringDigest(input: Data(tan.data(using: .utf8) ?? .init())) @@ -53,23 +53,28 @@ struct GatewayConnection { return } - let keyParam: [String: Any] = [ - "type": "EC", - "value": pubKey, - ] + let keyParam: [String: Any] = [ "type": "EC", "value": pubKey ] let param: [String: Any] = [ "DGCI": cert.uvci, "TANHash": tanHash, "certhash": certHash, "publicKey": keyParam, "signature": sign.base64EncodedString(), - "sigAlg": "SHA256withECDSA", + "sigAlg": "SHA256withECDSA" ] - AF.request(serverURI + claimEndpoint, method: .post, parameters: param, encoding: JSONEncoding.default, headers: nil, interceptor: nil, requestModifier: nil).response { + AF.request( + serverURI + claimEndpoint, + method: .post, + parameters: param, + encoding: JSONEncoding.default, + headers: nil, + interceptor: nil, + requestModifier: nil + ).response { guard case .success(_) = $0.result, let status = $0.response?.statusCode, - status == 204 + status / 100 == 2 else { completion?(false, nil) return diff --git a/DGCAWallet/Services/SecureBackground.swift b/DGCAWallet/Services/SecureBackground.swift index d4fd785..c2a2086 100644 --- a/DGCAWallet/Services/SecureBackground.swift +++ b/DGCAWallet/Services/SecureBackground.swift @@ -25,7 +25,6 @@ // Created by Yannick Spreen on 4/27/21. // - import Foundation import UIKit import LocalAuthentication @@ -52,7 +51,9 @@ struct SecureBackground { public static func disable() { if imageView != nil { if activation.timeIntervalSinceNow < -1 { - (UIApplication.shared.windows[0].rootViewController as? UINavigationController)?.popToRootViewController(animated: false) + ( + UIApplication.shared.windows[0].rootViewController as? UINavigationController + )?.popToRootViewController(animated: false) } imageView?.removeFromSuperview() imageView = nil @@ -75,7 +76,7 @@ struct SecureBackground { completion?(true) return } - context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reason ) { success, error in + context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reason ) { success, _ in if success { // Move to the main thread because a state update triggers UI changes. DispatchQueue.main.async { diff --git a/DGCAWallet/SupportingFiles/AppDelegate.swift b/DGCAWallet/SupportingFiles/AppDelegate.swift index 2d031e1..d422606 100644 --- a/DGCAWallet/SupportingFiles/AppDelegate.swift +++ b/DGCAWallet/SupportingFiles/AppDelegate.swift @@ -29,7 +29,10 @@ import UIKit @main class AppDelegate: UIResponder, UIApplicationDelegate { - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { // Override point for customization after application launch. return true } @@ -43,4 +46,3 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } } - diff --git a/DGCAWallet/SupportingFiles/SceneDelegate.swift b/DGCAWallet/SupportingFiles/SceneDelegate.swift index 6747a61..966b8e6 100644 --- a/DGCAWallet/SupportingFiles/SceneDelegate.swift +++ b/DGCAWallet/SupportingFiles/SceneDelegate.swift @@ -41,4 +41,3 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { } } - diff --git a/DGCAWallet/ViewControllers/CertPages.swift b/DGCAWallet/ViewControllers/CertPages.swift index 848e1a5..1c3fb8f 100644 --- a/DGCAWallet/ViewControllers/CertPages.swift +++ b/DGCAWallet/ViewControllers/CertPages.swift @@ -24,7 +24,6 @@ // // Created by Yannick Spreen on 4/30/21. // - import UIKit @@ -34,7 +33,7 @@ class CertPagesVC: UIPageViewController { var index = 0 let vcs: [UIViewController] = [ UIStoryboard(name: "CertificateViewer", bundle: .main).instantiateViewController(withIdentifier: "code"), - UIStoryboard(name: "CertificateViewer", bundle: .main).instantiateViewController(withIdentifier: "infoTable"), + UIStoryboard(name: "CertificateViewer", bundle: .main).instantiateViewController(withIdentifier: "infoTable") ] override func viewDidLoad() { @@ -65,12 +64,18 @@ class CertPagesVC: UIPageViewController { } extension CertPagesVC: UIPageViewControllerDataSource { - func pageViewController(_ pageViewController: UIPageViewController, viewControllerBefore viewController: UIViewController) -> UIViewController? { + func pageViewController( + _ pageViewController: UIPageViewController, + viewControllerBefore viewController: UIViewController + ) -> UIViewController? { let index = vcs.firstIndex(of: viewController) ?? 0 return index == 0 ? nil : vcs[index - 1] } - func pageViewController(_ pageViewController: UIPageViewController, viewControllerAfter viewController: UIViewController) -> UIViewController? { + func pageViewController( + _ pageViewController: UIPageViewController, + viewControllerAfter viewController: UIViewController + ) -> UIViewController? { let index = vcs.firstIndex(of: viewController) ?? vcs.count - 1 return index == vcs.count - 1 ? nil : vcs[index + 1] } @@ -93,11 +98,11 @@ extension CertPagesVC: UIPageViewControllerDelegate { ) { guard completed, - let vc = pageViewController.viewControllers?.first + let controller = pageViewController.viewControllers?.first else { return } - index = vcs.firstIndex(of: vc) ?? 0 + index = vcs.firstIndex(of: controller) ?? 0 setBrightness() } } diff --git a/DGCAWallet/ViewControllers/CertTable.swift b/DGCAWallet/ViewControllers/CertTable.swift index b8ca1c4..48959d4 100644 --- a/DGCAWallet/ViewControllers/CertTable.swift +++ b/DGCAWallet/ViewControllers/CertTable.swift @@ -24,7 +24,7 @@ // // Created by Yannick Spreen on 4/30/21. // - + import SwiftDGC import UIKit @@ -44,7 +44,6 @@ class CertTableVC: UIViewController { } } - extension CertTableVC: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return hCert.info.count diff --git a/DGCAWallet/ViewControllers/CertificateViewer.swift b/DGCAWallet/ViewControllers/CertificateViewer.swift index f5acf93..a26adb6 100644 --- a/DGCAWallet/ViewControllers/CertificateViewer.swift +++ b/DGCAWallet/ViewControllers/CertificateViewer.swift @@ -38,7 +38,7 @@ class CertificateViewerVC: UIViewController { var hCert: HCert! var tan: String? - var childDismissedDelegate: CertViewerDelegate? + weak var childDismissedDelegate: CertViewerDelegate? public var isSaved = true func draw() { diff --git a/DGCAWallet/ViewControllers/Home.swift b/DGCAWallet/ViewControllers/Home.swift index 22e93a1..28a8502 100644 --- a/DGCAWallet/ViewControllers/Home.swift +++ b/DGCAWallet/ViewControllers/Home.swift @@ -24,7 +24,6 @@ // // Created by Yannick Spreen on 4/25/21. // - import Foundation import UIKit @@ -34,7 +33,7 @@ class HomeVC: UIViewController { override func viewDidLoad() { super.viewDidLoad() - HCert.PREFETCH_ALL_CODES = true + HCert.prefetchAllCodes = true LocalData.initialize { DispatchQueue.main.async { [weak self] in guard let self = self else { diff --git a/DGCAWallet/ViewControllers/List.swift b/DGCAWallet/ViewControllers/List.swift index efdffe9..1f15337 100644 --- a/DGCAWallet/ViewControllers/List.swift +++ b/DGCAWallet/ViewControllers/List.swift @@ -24,7 +24,6 @@ // // Created by Yannick Spreen on 4/25/21. // - import Foundation import UIKit @@ -158,7 +157,11 @@ extension ListVC: UITableViewDelegate { } extension ListVC: FloatingPanelControllerDelegate { - func floatingPanel(_ fpc: FloatingPanelController, shouldRemoveAt location: CGPoint, with velocity: CGVector) -> Bool { + func floatingPanel( + _ fpc: FloatingPanelController, + shouldRemoveAt location: CGPoint, + with velocity: CGVector + ) -> Bool { let pos = location.y / view.bounds.height if pos >= 0.33 { return true diff --git a/DGCAWalletTests/EHNTests.swift b/DGCAWalletTests/EHNTests.swift index 4f2ed09..fac4932 100644 --- a/DGCAWalletTests/EHNTests.swift +++ b/DGCAWalletTests/EHNTests.swift @@ -10,31 +10,33 @@ import XCTest import SwiftDGC class EHNTests: XCTestCase { + + let trustJson = """ + [ + { + \"kid\" : \"DEFBBA3378B322F5\", + \"coord\" : [ + \"230ca0433313f4ef14ec0ab0477b241781d135ee09369507fcf44ca988ed09d6\", + \"bf1bfe3d2bda606c841242b59c568d00e5c8dd114d223b2f5036d8c5bc68bf5d\" + ] + }, + { + \"kid\" : \"FFFBBA3378B322F5\", + \"coord\" : [ + \"9999a0433313f4ef14ec0ab0477b241781d135ee09369507fcf44ca988ed09d6\", + \"9999fe3d2bda606c841242b59c568d00e5c8dd114d223b2f5036d8c5bc68bf5d\" + ] + } + ] + """ + func testCoseEcdsa() throws { + // swiftlint:disable:next line_length var barcode = "HC1:NCFY70R30FFWTWGSLKC 4O992$V M63TMF2V*D9LPC.3EHPCGEC27B72VF/347O4-M6Y9M6FOYG4ILDEI8GR3ZI$15MABL:E9CVBGEEWRMLE C39S0/ANZ52T82Z-73D63P1U 1$PKC 72H2XX09WDH889V5" - let trustJson = """ - [ - { - \"kid\" : \"DEFBBA3378B322F5\", - \"coord\" : [ - \"230ca0433313f4ef14ec0ab0477b241781d135ee09369507fcf44ca988ed09d6\", - \"bf1bfe3d2bda606c841242b59c568d00e5c8dd114d223b2f5036d8c5bc68bf5d\" - ] - }, - { - \"kid\" : \"FFFBBA3378B322F5\", - \"coord\" : [ - \"9999a0433313f4ef14ec0ab0477b241781d135ee09369507fcf44ca988ed09d6\", - \"9999fe3d2bda606c841242b59c568d00e5c8dd114d223b2f5036d8c5bc68bf5d\" - ] - } - ] - """ - // Remove HC1 header if any (v0.0.3 'HC1', v0.0.4 'HC1:') // - if (barcode.hasPrefix("HC1:")) { + if barcode.hasPrefix("HC1:") { barcode = String(barcode.suffix(barcode.count-4)) } @@ -59,12 +61,12 @@ class EHNTests: XCTestCase { } for case let elem: Dictionary in trust { if - kid == Data(hexString: elem["kid"] as! String)?.uint, - let x = (elem["coord"] as? Array)?[0] as? String, - let y = (elem["coord"] as? Array)?[1] as? String + kid == Data(hexString: (elem["kid"] as? String) ?? "")?.uint, + let xParam = (elem["coord"] as? [String])?[0], + let yParam = (elem["coord"] as? [String])?[1] { print("We know this KID - check if this sig works...") - if COSE.verify(data, with: x, and: y) { + if COSE.verify(data, with: xParam, and: yParam) { print("All is well! Payload: ", payload) return } @@ -75,17 +77,19 @@ class EHNTests: XCTestCase { XCTAssert(false) } func testCoseEcAT() throws { + // swiftlint:disable:next line_length let barcode = "HC1:NCFC:M/8OBK2 53WGEI1J%1IEAKE%GKV5B8M38S78UU+RRIR+1CT013E9ZI8$*NVQE+PQKR434V:-NN551/A*HSD87*JGTPKU77HTHOTIY/9VPKP859+1Q-1JCFL:O8SBM:5I%7X2NRAQ1XL0$E867W1FH-NIAWOQJEFELCNXMT7S739DJ2G2*CYG9IEMEU7/.B%E9 $0DKJPRIK-RRX2WBPOFE32TW HL24/YI4SO5LF04NZ-D O9$K9$IHYTC4JB622YMQ.5LVXH64JFGG-L0LJTW88O.L5T48AW2MTJD8CL4OUE4V2HX88FAH 89NKJS2SMPU%I8OC0AEPJ0 F2SMTERNC7CM20P00C9L8MBI.PMP9WWG6ICY$FK/QARHN+JX8S24UU00CEAA:SQUTY0LPRGQXVN6Q*UR-WH/FC8CJQ8WLBJH$47O8+.GMF78*A85H1GU4SPNC3TVKQBK:7C836%WI/QR$EC0YE:E77%LHAE5T07AVLUPLW38MMNF00 CE9U$-VKYU ZN1V3C:M9YH.RDK%VQSC.GRN29JSENCEX7SQ.J6:4D28Z*E*3V5/R6Q7*:3I R+1GUZQ$LBB 7B-E2KTU/0X1B- UKUJJ2U0.H 0RM2GBGIQ+M" return baseTestAT(barcode: barcode) } func testCoseRsaAT() throws { + // swiftlint:disable:next line_length let barcode = "HC1:NCFOXNYTS3DH$YO:CQSU40 H 804 2FI15B3LR5OGILG9N:5-RII9DL-VAD65D6 NI4EFFZSE+S.SSH2HGUS XKVD9HB58QHVM6IQ17XH0S9S-JX%EI$HGL24EGYJ2SKISE02UQHPMYO9MN9JUHLKH.O93UQFJ6GL28LHXOAYJAPRAAUICO10W59UE1YHU-H4PIUF2VSJGV4J4LV/AYVG2$436D$X40YC2ATNS4Y6TKR2*G5C%CO8TJV4423 L0VV2 73-E3ND3DAJ-432$4U1JS.S./0LWTKD33236J3TA3E-4%:K7-SN2H N37J3JFTULJ5CBP:2C 2+*4HTC/2DBAJDAJCNB-43GV4MCTKD08DJHSI PISVDGZK4EC8.SX1LC8C8DJOMI$MI-N09*0245$UH8QIBD2GMJCKH9AO2R7./HBR6$LE KMDGKRFRSGHQED10H% 0R%0D 8YIPFHL:OTEGJUY25$0P/HX$4T0H//CI+CF/8-0LO1PX$4D4TVZ0D-4VZ0S1LZ0L:M623Q$B65VCNAIO38ZIIT-ROGV86O*$2/6PSQHV-P TN3H38EU2VME.3F$MM3WYC3A1N%IFBZV3P6$A9X81M:L-5TTPNFIVD6KL/O63UX0O7V9BYEB:IB BUAA9JM:ATN.AR81Y4GP21CPVY6P:KPG:LNLL%70/6MRVMT0LV0E7*EVLS2UIU6V2M3%26%Q3J*H:5L-28SXRWUH$LCQ/S3QTY5NG.8C5MN$V4-BXJMF5RG3U6-1RDVRWNY$3/ZB3MOQDWC*08M0AV5*/0QX4B-EF0MGH5X1FYHRGX8:+RY/EI%BQ95TC5*DW/ESR4S0:1ZF59*5GK1-OH4Z6-6FUOTN*H$38IPR4GT1$OE07B*SWKN*HF83N MO.CFOW3R%GB28Z$UOH7DROI9BW/CXPS0.PS USQE:LAVZP320%R902" return baseTestAT(barcode: barcode) } func baseTestAT(barcode: String) { var barcode = barcode // Remove HC1 header if any - if (barcode.hasPrefix("HC1:")) { + if barcode.hasPrefix("HC1:") { barcode = String(barcode.suffix(barcode.count-4)) } @@ -134,7 +138,7 @@ class EHNTests: XCTestCase { } } -/** +/* Produces: diff --git a/DGCAWalletUITests/DGCAWalletUITests.swift b/DGCAWalletUITests/DGCAWalletUITests.swift index 5094cc6..c235745 100644 --- a/DGCAWalletUITests/DGCAWalletUITests.swift +++ b/DGCAWalletUITests/DGCAWalletUITests.swift @@ -15,7 +15,8 @@ class DGCAWalletUITests: XCTestCase { // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false - // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + // In UI tests it’s important to set the initial state - such as interface + // orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDownWithError() throws {