Skip to content

Commit 636367f

Browse files
committed
add a UI
1 parent 16dc160 commit 636367f

File tree

7 files changed

+812
-9
lines changed

7 files changed

+812
-9
lines changed

cardreader.xcodeproj/project.pbxproj

+32
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
7463008F1E13EFC200ECD5A1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7463008D1E13EFC200ECD5A1 /* Main.storyboard */; };
1414
7463009A1E13EFC200ECD5A1 /* cardreaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 746300991E13EFC200ECD5A1 /* cardreaderTests.swift */; };
1515
746300A51E13EFC200ECD5A1 /* cardreaderUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 746300A41E13EFC200ECD5A1 /* cardreaderUITests.swift */; };
16+
746300B51E13F08100ECD5A1 /* CryptoTokenKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 746300B41E13F08100ECD5A1 /* CryptoTokenKit.framework */; };
17+
746300B81E14259E00ECD5A1 /* BEIDCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 746300B71E14259E00ECD5A1 /* BEIDCard.swift */; };
18+
746300BA1E156B8400ECD5A1 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 746300B91E156B8400ECD5A1 /* MapKit.framework */; };
1619
/* End PBXBuildFile section */
1720

1821
/* Begin PBXContainerItemProxy section */
@@ -45,13 +48,19 @@
4548
746300A01E13EFC200ECD5A1 /* cardreaderUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = cardreaderUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4649
746300A41E13EFC200ECD5A1 /* cardreaderUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = cardreaderUITests.swift; sourceTree = "<group>"; };
4750
746300A61E13EFC200ECD5A1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
51+
746300B21E13F00E00ECD5A1 /* cardreader.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = cardreader.entitlements; sourceTree = "<group>"; };
52+
746300B41E13F08100ECD5A1 /* CryptoTokenKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CryptoTokenKit.framework; path = System/Library/Frameworks/CryptoTokenKit.framework; sourceTree = SDKROOT; };
53+
746300B71E14259E00ECD5A1 /* BEIDCard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BEIDCard.swift; sourceTree = "<group>"; };
54+
746300B91E156B8400ECD5A1 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
4855
/* End PBXFileReference section */
4956

5057
/* Begin PBXFrameworksBuildPhase section */
5158
746300811E13EFC200ECD5A1 /* Frameworks */ = {
5259
isa = PBXFrameworksBuildPhase;
5360
buildActionMask = 2147483647;
5461
files = (
62+
746300BA1E156B8400ECD5A1 /* MapKit.framework in Frameworks */,
63+
746300B51E13F08100ECD5A1 /* CryptoTokenKit.framework in Frameworks */,
5564
);
5665
runOnlyForDeploymentPostprocessing = 0;
5766
};
@@ -79,6 +88,7 @@
7988
746300981E13EFC200ECD5A1 /* cardreaderTests */,
8089
746300A31E13EFC200ECD5A1 /* cardreaderUITests */,
8190
746300851E13EFC200ECD5A1 /* Products */,
91+
746300B31E13F08100ECD5A1 /* Frameworks */,
8292
);
8393
sourceTree = "<group>";
8494
};
@@ -95,7 +105,9 @@
95105
746300861E13EFC200ECD5A1 /* cardreader */ = {
96106
isa = PBXGroup;
97107
children = (
108+
746300B21E13F00E00ECD5A1 /* cardreader.entitlements */,
98109
746300871E13EFC200ECD5A1 /* AppDelegate.swift */,
110+
746300B71E14259E00ECD5A1 /* BEIDCard.swift */,
99111
746300891E13EFC200ECD5A1 /* ViewController.swift */,
100112
7463008B1E13EFC200ECD5A1 /* Assets.xcassets */,
101113
7463008D1E13EFC200ECD5A1 /* Main.storyboard */,
@@ -122,6 +134,15 @@
122134
path = cardreaderUITests;
123135
sourceTree = "<group>";
124136
};
137+
746300B31E13F08100ECD5A1 /* Frameworks */ = {
138+
isa = PBXGroup;
139+
children = (
140+
746300B91E156B8400ECD5A1 /* MapKit.framework */,
141+
746300B41E13F08100ECD5A1 /* CryptoTokenKit.framework */,
142+
);
143+
name = Frameworks;
144+
sourceTree = "<group>";
145+
};
125146
/* End PBXGroup section */
126147

127148
/* Begin PBXNativeTarget section */
@@ -192,6 +213,11 @@
192213
CreatedOnToolsVersion = 8.2;
193214
DevelopmentTeam = 7TD9A665TC;
194215
ProvisioningStyle = Automatic;
216+
SystemCapabilities = {
217+
com.apple.Sandbox = {
218+
enabled = 1;
219+
};
220+
};
195221
};
196222
746300941E13EFC200ECD5A1 = {
197223
CreatedOnToolsVersion = 8.2;
@@ -259,6 +285,7 @@
259285
buildActionMask = 2147483647;
260286
files = (
261287
7463008A1E13EFC200ECD5A1 /* ViewController.swift in Sources */,
288+
746300B81E14259E00ECD5A1 /* BEIDCard.swift in Sources */,
262289
746300881E13EFC200ECD5A1 /* AppDelegate.swift in Sources */,
263290
);
264291
runOnlyForDeploymentPostprocessing = 0;
@@ -400,6 +427,7 @@
400427
isa = XCBuildConfiguration;
401428
buildSettings = {
402429
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
430+
CODE_SIGN_ENTITLEMENTS = cardreader/cardreader.entitlements;
403431
COMBINE_HIDPI_IMAGES = YES;
404432
DEVELOPMENT_TEAM = 7TD9A665TC;
405433
INFOPLIST_FILE = cardreader/Info.plist;
@@ -414,6 +442,7 @@
414442
isa = XCBuildConfiguration;
415443
buildSettings = {
416444
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
445+
CODE_SIGN_ENTITLEMENTS = cardreader/cardreader.entitlements;
417446
COMBINE_HIDPI_IMAGES = YES;
418447
DEVELOPMENT_TEAM = 7TD9A665TC;
419448
INFOPLIST_FILE = cardreader/Info.plist;
@@ -505,6 +534,7 @@
505534
746300AB1E13EFC200ECD5A1 /* Release */,
506535
);
507536
defaultConfigurationIsVisible = 0;
537+
defaultConfigurationName = Release;
508538
};
509539
746300AC1E13EFC200ECD5A1 /* Build configuration list for PBXNativeTarget "cardreaderTests" */ = {
510540
isa = XCConfigurationList;
@@ -513,6 +543,7 @@
513543
746300AE1E13EFC200ECD5A1 /* Release */,
514544
);
515545
defaultConfigurationIsVisible = 0;
546+
defaultConfigurationName = Release;
516547
};
517548
746300AF1E13EFC200ECD5A1 /* Build configuration list for PBXNativeTarget "cardreaderUITests" */ = {
518549
isa = XCConfigurationList;
@@ -521,6 +552,7 @@
521552
746300B11E13EFC200ECD5A1 /* Release */,
522553
);
523554
defaultConfigurationIsVisible = 0;
555+
defaultConfigurationName = Release;
524556
};
525557
/* End XCConfigurationList section */
526558
};

cardreader.xcodeproj/xcuserdata/damiaan.xcuserdatad/xcschemes/cardreader.xcscheme

+65
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,59 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
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 = "746300831E13EFC200ECD5A1"
18+
BuildableName = "cardreader.app"
19+
BlueprintName = "cardreader"
20+
ReferencedContainer = "container:cardreader.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
824
</BuildAction>
925
<TestAction
1026
buildConfiguration = "Debug"
1127
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
1228
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
1329
shouldUseLaunchSchemeArgsEnv = "YES">
1430
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "746300941E13EFC200ECD5A1"
36+
BuildableName = "cardreaderTests.xctest"
37+
BlueprintName = "cardreaderTests"
38+
ReferencedContainer = "container:cardreader.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
<TestableReference
42+
skipped = "NO">
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "7463009F1E13EFC200ECD5A1"
46+
BuildableName = "cardreaderUITests.xctest"
47+
BlueprintName = "cardreaderUITests"
48+
ReferencedContainer = "container:cardreader.xcodeproj">
49+
</BuildableReference>
50+
</TestableReference>
1551
</Testables>
52+
<MacroExpansion>
53+
<BuildableReference
54+
BuildableIdentifier = "primary"
55+
BlueprintIdentifier = "746300831E13EFC200ECD5A1"
56+
BuildableName = "cardreader.app"
57+
BlueprintName = "cardreader"
58+
ReferencedContainer = "container:cardreader.xcodeproj">
59+
</BuildableReference>
60+
</MacroExpansion>
1661
<AdditionalOptions>
1762
</AdditionalOptions>
1863
</TestAction>
@@ -26,6 +71,16 @@
2671
debugDocumentVersioning = "YES"
2772
debugServiceExtension = "internal"
2873
allowLocationSimulation = "YES">
74+
<BuildableProductRunnable
75+
runnableDebuggingMode = "0">
76+
<BuildableReference
77+
BuildableIdentifier = "primary"
78+
BlueprintIdentifier = "746300831E13EFC200ECD5A1"
79+
BuildableName = "cardreader.app"
80+
BlueprintName = "cardreader"
81+
ReferencedContainer = "container:cardreader.xcodeproj">
82+
</BuildableReference>
83+
</BuildableProductRunnable>
2984
<AdditionalOptions>
3085
</AdditionalOptions>
3186
</LaunchAction>
@@ -35,6 +90,16 @@
3590
savedToolIdentifier = ""
3691
useCustomWorkingDirectory = "NO"
3792
debugDocumentVersioning = "YES">
93+
<BuildableProductRunnable
94+
runnableDebuggingMode = "0">
95+
<BuildableReference
96+
BuildableIdentifier = "primary"
97+
BlueprintIdentifier = "746300831E13EFC200ECD5A1"
98+
BuildableName = "cardreader.app"
99+
BlueprintName = "cardreader"
100+
ReferencedContainer = "container:cardreader.xcodeproj">
101+
</BuildableReference>
102+
</BuildableProductRunnable>
38103
</ProfileAction>
39104
<AnalyzeAction
40105
buildConfiguration = "Debug">

cardreader/AppDelegate.swift

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
import Cocoa
10+
import CryptoTokenKit
1011

1112
@NSApplicationMain
1213
class AppDelegate: NSObject, NSApplicationDelegate {
@@ -15,6 +16,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
1516

1617
func applicationDidFinishLaunching(_ aNotification: Notification) {
1718
// Insert code here to initialize your application
19+
1820
}
1921

2022
func applicationWillTerminate(_ aNotification: Notification) {
@@ -24,3 +26,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
2426

2527
}
2628

29+
extension Data {
30+
func hexEncodedString() -> String {
31+
return map { String(format: "%02hhx", $0) }.joined()
32+
}
33+
}

0 commit comments

Comments
 (0)