Skip to content

Commit

Permalink
Start local encrypted db.
Browse files Browse the repository at this point in the history
  • Loading branch information
yspreen committed Apr 25, 2021
1 parent 57a1a02 commit 3a72cbb
Show file tree
Hide file tree
Showing 8 changed files with 311 additions and 18 deletions.
8 changes: 8 additions & 0 deletions DGCAVerifier.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
CE8912EA26321DAA00CB92AF /* SHA256.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE8912E926321DAA00CB92AF /* SHA256.swift */; };
CE8912F52634C60E00CB92AF /* GatewayConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE8912F42634C60E00CB92AF /* GatewayConnection.swift */; };
CE8912FB2634C6B900CB92AF /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = CE8912FA2634C6B900CB92AF /* Alamofire */; };
CE891300263570CF00CB92AF /* Enclave.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE8912FF263570CF00CB92AF /* Enclave.swift */; };
CE891305263581D900CB92AF /* Home.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE891304263581D900CB92AF /* Home.swift */; };
CEA1555D262F63B30024B7AC /* EuDgcSchema.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEA1555C262F63B30024B7AC /* EuDgcSchema.swift */; };
CEA15563262F6DAB0024B7AC /* ChildDismissedDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEA15562262F6DAB0024B7AC /* ChildDismissedDelegate.swift */; };
CEA1556B262F784E0024B7AC /* SelfSizedTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEA1556A262F784E0024B7AC /* SelfSizedTableView.swift */; };
Expand Down Expand Up @@ -82,6 +84,8 @@
CE8912E426321AA500CB92AF /* KID.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KID.swift; sourceTree = "<group>"; };
CE8912E926321DAA00CB92AF /* SHA256.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHA256.swift; sourceTree = "<group>"; };
CE8912F42634C60E00CB92AF /* GatewayConnection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GatewayConnection.swift; sourceTree = "<group>"; };
CE8912FF263570CF00CB92AF /* Enclave.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Enclave.swift; sourceTree = "<group>"; };
CE891304263581D900CB92AF /* Home.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Home.swift; sourceTree = "<group>"; };
CEA1555C262F63B30024B7AC /* EuDgcSchema.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EuDgcSchema.swift; sourceTree = "<group>"; };
CEA15562262F6DAB0024B7AC /* ChildDismissedDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChildDismissedDelegate.swift; sourceTree = "<group>"; };
CEA1556A262F784E0024B7AC /* SelfSizedTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelfSizedTableView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -164,6 +168,7 @@
CE8912E426321AA500CB92AF /* KID.swift */,
CE8912E926321DAA00CB92AF /* SHA256.swift */,
CE8912F42634C60E00CB92AF /* GatewayConnection.swift */,
CE8912FF263570CF00CB92AF /* Enclave.swift */,
);
path = Services;
sourceTree = "<group>";
Expand All @@ -186,6 +191,7 @@
children = (
CE13CF09262DCDDA0070C80E /* CertificateViewer.swift */,
CEA6D6EF261F8D2700715333 /* Scan.swift */,
CE891304263581D900CB92AF /* Home.swift */,
);
path = ViewControllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -433,6 +439,7 @@
CE13CF0A262DCDDA0070C80E /* CertificateViewer.swift in Sources */,
CEC2C4C32625ED030056E406 /* JWK.swift in Sources */,
CEC2C4C42625ED030056E406 /* Base45.swift in Sources */,
CE891300263570CF00CB92AF /* Enclave.swift in Sources */,
CE8912EA26321DAA00CB92AF /* SHA256.swift in Sources */,
CE3CC9442628C2130079FB78 /* CBOR.swift in Sources */,
CE44799226306C86009A836B /* String.swift in Sources */,
Expand All @@ -449,6 +456,7 @@
CEFAD86D2625F164009AFEF9 /* Signature.swift in Sources */,
CE13CF23262DDF810070C80E /* RoundedButton.swift in Sources */,
CEA6D6EC261F8D2700715333 /* AppDelegate.swift in Sources */,
CE891305263581D900CB92AF /* Home.swift in Sources */,
CEA15563262F6DAB0024B7AC /* ChildDismissedDelegate.swift in Sources */,
CEFAD8722625F29E009AFEF9 /* String+JSON.swift in Sources */,
CEC2C4C22625ED030056E406 /* ZLib.swift in Sources */,
Expand Down
49 changes: 34 additions & 15 deletions DGCAVerifier/Storyboards/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,33 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<device id="retina4_7" orientation="portrait" appearance="light" />
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
<deployment identifier="iOS" />
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703" />
<capability name="Safe area layout guides" minToolsVersion="9.0" />
<capability name="System colors in document resources" minToolsVersion="11.0" />
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0" />
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="hea_dgf_icons-2" translatesAutoresizingMaskIntoConstraints="NO" id="W44-ZU-RIp">
<rect key="frame" x="87.5" y="141.5" width="200" height="200" />
<constraints>
<constraint firstAttribute="width" constant="200" id="nmQ-8g-dAp" />
<constraint firstAttribute="height" constant="200" id="rTl-re-1de" />
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BaC-Rv-DYO">
<rect key="frame" x="0.0" y="0.0" width="375" height="133.5" />
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace" />
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY" />
<color key="backgroundColor" red="0.99607843137254903" green="0.93333333333333335" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="displayP3" />
<constraints>
<constraint firstItem="W44-ZU-RIp" firstAttribute="top" secondItem="BaC-Rv-DYO" secondAttribute="bottom" constant="8" id="A1q-lp-Ynh" />
<constraint firstAttribute="trailing" secondItem="BaC-Rv-DYO" secondAttribute="trailing" id="F7A-pY-8Mk" />
<constraint firstItem="BaC-Rv-DYO" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="JHZ-Yo-7a3" />
<constraint firstItem="BaC-Rv-DYO" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="JhQ-xG-reB" />
<constraint firstItem="BaC-Rv-DYO" firstAttribute="height" secondItem="Ze5-6b-2t3" secondAttribute="height" multiplier="0.2" id="g1x-Ss-QDG" />
<constraint firstItem="W44-ZU-RIp" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="qNG-sL-f4L" />
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder" />
</objects>
<point key="canvasLocation" x="53" y="375"/>
<point key="canvasLocation" x="52" y="374.66266866566718" />
</scene>
</scenes>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<image name="hea_dgf_icons-2" width="201" height="201" />
</resources>
</document>
61 changes: 60 additions & 1 deletion DGCAVerifier/Storyboards/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="q2g-Cz-5x2">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
Expand All @@ -17,10 +17,69 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<navigationItem key="navigationItem" id="DC8-2u-JQC"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="138" y="106"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="ET7-36-BP0">
<objects>
<navigationController navigationBarHidden="YES" id="q2g-Cz-5x2" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="oay-40-aHM">
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="73A-19-HUe" kind="relationship" relationship="rootViewController" id="AQh-VG-O6B"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="5eU-tP-IWk" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1504" y="106"/>
</scene>
<!--HomeVC-->
<scene sceneID="5NK-Oh-cKU">
<objects>
<viewController id="73A-19-HUe" customClass="HomeVC" customModule="PatientScannerDemo" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="itp-Pk-qqa">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="hea_dgf_icons-2" translatesAutoresizingMaskIntoConstraints="NO" id="uVo-xl-74N">
<rect key="frame" x="107" y="187" width="200" height="200"/>
<constraints>
<constraint firstAttribute="height" constant="200" id="cwN-8N-mhg"/>
<constraint firstAttribute="width" constant="200" id="lGB-VI-vWc"/>
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Fa-fZ-rcH">
<rect key="frame" x="0.0" y="0.0" width="414" height="179"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="4mO-IA-e98"/>
<color key="backgroundColor" red="0.99607843139999996" green="0.93333333330000001" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
<constraint firstItem="1Fa-fZ-rcH" firstAttribute="height" secondItem="itp-Pk-qqa" secondAttribute="height" multiplier="0.2" id="2OP-qL-4P5"/>
<constraint firstItem="uVo-xl-74N" firstAttribute="top" secondItem="1Fa-fZ-rcH" secondAttribute="bottom" constant="8" id="44p-j5-T5I"/>
<constraint firstItem="uVo-xl-74N" firstAttribute="centerX" secondItem="itp-Pk-qqa" secondAttribute="centerX" id="5VX-vB-nMv"/>
<constraint firstItem="1Fa-fZ-rcH" firstAttribute="top" secondItem="itp-Pk-qqa" secondAttribute="top" id="VuD-Ro-tli"/>
<constraint firstItem="1Fa-fZ-rcH" firstAttribute="leading" secondItem="itp-Pk-qqa" secondAttribute="leading" id="ek5-ka-fDv"/>
<constraint firstAttribute="trailing" secondItem="1Fa-fZ-rcH" secondAttribute="trailing" id="w5N-a8-0zX"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="3ZE-my-T2k"/>
<connections>
<segue destination="BYZ-38-t0r" kind="show" identifier="scanner" id="6xN-iL-kja"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="XEE-QW-Mei" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-674" y="106"/>
</scene>
</scenes>
<resources>
<image name="hea_dgf_icons-2" width="201" height="201"/>
</resources>
</document>
5 changes: 3 additions & 2 deletions DGCAVerifier/ViewControllers/Scan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ class ScanVC: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
// checkPermissions()
// setupCameraLiveView()
checkPermissions()
setupCameraLiveView()
return;
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.observationHandler(payloadS: nil)
// let reason = "Log in to your account"
Expand Down
Loading

0 comments on commit 3a72cbb

Please sign in to comment.