Skip to content

Commit f2c3ec2

Browse files
committed
add macOS 10.10 support
1 parent 447be43 commit f2c3ec2

File tree

7 files changed

+50
-29
lines changed

7 files changed

+50
-29
lines changed

eidReader.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@
376376
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
377377
GCC_WARN_UNUSED_FUNCTION = YES;
378378
GCC_WARN_UNUSED_VARIABLE = YES;
379-
MACOSX_DEPLOYMENT_TARGET = 10.12;
379+
MACOSX_DEPLOYMENT_TARGET = 10.10;
380380
MTL_ENABLE_DEBUG_INFO = YES;
381381
ONLY_ACTIVE_ARCH = YES;
382382
SDKROOT = macosx;
@@ -419,7 +419,7 @@
419419
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
420420
GCC_WARN_UNUSED_FUNCTION = YES;
421421
GCC_WARN_UNUSED_VARIABLE = YES;
422-
MACOSX_DEPLOYMENT_TARGET = 10.12;
422+
MACOSX_DEPLOYMENT_TARGET = 10.10;
423423
MTL_ENABLE_DEBUG_INFO = NO;
424424
SDKROOT = macosx;
425425
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";

eidReader/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,6 @@
5959
"idiom" : "mac",
6060
"filename" : "icon_512x512@2x.png",
6161
"scale" : "2x"
62-
},
63-
{
64-
"size" : "256x256",
65-
"idiom" : "mac",
66-
"filename" : "icon_512x512.png",
67-
"unassigned" : true,
68-
"scale" : "2x"
6962
}
7063
],
7164
"info" : {
-280 KB
Binary file not shown.

eidReader/BEIDCard.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,9 @@ extension DateFormatter {
255255
self.init()
256256
self.dateFormat = format
257257
}
258+
259+
convenience init(style: DateFormatter.Style) {
260+
self.init()
261+
self.dateStyle = style
262+
}
258263
}

eidReader/Base.lproj/Main.storyboard

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
55
<plugIn identifier="com.apple.MapKitIBPlugin" version="11762"/>
66
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
7-
<capability name="cells containing NSDateIntervalFormatter" minSystemVersion="10.11"/>
87
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
98
<capability name="stacking Non-gravity area distributions on NSStackView" minToolsVersion="7.0" minSystemVersion="10.11"/>
109
</dependencies>
@@ -658,7 +657,7 @@
658657
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
659658
</connections>
660659
</application>
661-
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="cardreader" customModuleProvider="target"/>
660+
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="eidReader" customModuleProvider="target"/>
662661
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
663662
</objects>
664663
<point key="canvasLocation" x="75" y="0.0"/>
@@ -684,37 +683,37 @@
684683
<!--View Controller-->
685684
<scene sceneID="hIz-AP-VOD">
686685
<objects>
687-
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModule="cardreader" customModuleProvider="target" sceneMemberID="viewController">
686+
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModule="eidReader" customModuleProvider="target" sceneMemberID="viewController">
688687
<view key="view" wantsLayer="YES" id="m2S-Jp-Qdl">
689688
<rect key="frame" x="0.0" y="0.0" width="621" height="433"/>
690689
<autoresizingMask key="autoresizingMask"/>
691690
<subviews>
692691
<progressIndicator wantsLayer="YES" maxValue="11" displayedWhenStopped="NO" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="LYm-lH-Cvb">
693-
<rect key="frame" x="56" y="322" width="32" height="32"/>
692+
<rect key="frame" x="56" y="322.5" width="32" height="32"/>
694693
</progressIndicator>
695694
<imageView wantsLayer="YES" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="gjR-aj-CdO">
696-
<rect key="frame" x="20" y="262" width="105" height="151"/>
695+
<rect key="frame" x="20" y="262.5" width="104.5" height="150.5"/>
697696
<constraints>
698697
<constraint firstAttribute="width" secondItem="gjR-aj-CdO" secondAttribute="height" multiplier="7:10" id="tWr-9I-dkO"/>
699698
</constraints>
700699
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" id="dA3-61-187"/>
701700
</imageView>
702701
<mapView mapType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="acT-Ao-SIC">
703-
<rect key="frame" x="20" y="20" width="581" height="209"/>
702+
<rect key="frame" x="20" y="20" width="581" height="209.5"/>
704703
<constraints>
705704
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="150" id="PNQ-am-3WJ"/>
706705
</constraints>
707706
</mapView>
708707
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tdp-mB-Lhz">
709-
<rect key="frame" x="18" y="237" width="76" height="17"/>
708+
<rect key="frame" x="18" y="237.5" width="76" height="17"/>
710709
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Woonplaats" id="WQG-9c-flS">
711710
<font key="font" metaFont="system"/>
712711
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
713712
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
714713
</textFieldCell>
715714
</textField>
716715
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="16" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="h1t-iY-yBT">
717-
<rect key="frame" x="146" y="262" width="249" height="150"/>
716+
<rect key="frame" x="144" y="262.5" width="340" height="150"/>
718717
<subviews>
719718
<stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="14x-IE-kut">
720719
<rect key="frame" x="0.0" y="83" width="249" height="67"/>
@@ -840,7 +839,7 @@
840839
</customSpacing>
841840
</stackView>
842841
<stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="s3j-Z6-vlH">
843-
<rect key="frame" x="0.0" y="0.0" width="238" height="67"/>
842+
<rect key="frame" x="0.0" y="0.0" width="340" height="67"/>
844843
<subviews>
845844
<stackView distribution="fill" orientation="horizontal" alignment="top" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7FK-1z-xQ1">
846845
<rect key="frame" x="0.0" y="50" width="135" height="17"/>
@@ -872,20 +871,37 @@
872871
</customSpacing>
873872
</stackView>
874873
<stackView distribution="fill" orientation="horizontal" alignment="top" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0zl-DO-aLg">
875-
<rect key="frame" x="0.0" y="25" width="238" height="17"/>
874+
<rect key="frame" x="0.0" y="25" width="340" height="17"/>
876875
<subviews>
877876
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ndE-1D-oat">
878-
<rect key="frame" x="-2" y="0.0" width="122" height="17"/>
879-
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Geldigheidsperiode" id="n2z-o1-IxF">
877+
<rect key="frame" x="-2" y="0.0" width="80" height="17"/>
878+
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Geldig vanaf" id="n2z-o1-IxF">
880879
<font key="font" metaFont="system"/>
881880
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
882881
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
883882
</textFieldCell>
884883
</textField>
885884
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Agz-HH-rck">
886-
<rect key="frame" x="124" y="0.0" width="116" height="17"/>
885+
<rect key="frame" x="82" y="0.0" width="116" height="17"/>
887886
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="10 november 2012" id="mdB-j1-6a6">
888-
<dateIntervalFormatter key="formatter" dateStyle="long" id="dww-iR-mwu"/>
887+
<dateFormatter key="formatter" dateStyle="long" doesRelativeDateFormatting="YES" id="X2W-Qt-u2M"/>
888+
<font key="font" metaFont="system"/>
889+
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
890+
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
891+
</textFieldCell>
892+
</textField>
893+
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vBv-7p-db3">
894+
<rect key="frame" x="202" y="0.0" width="21" height="17"/>
895+
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="tot" id="PgG-UZ-LHC">
896+
<font key="font" metaFont="system"/>
897+
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
898+
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
899+
</textFieldCell>
900+
</textField>
901+
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zhZ-1V-wOs">
902+
<rect key="frame" x="227" y="0.0" width="115" height="17"/>
903+
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="10 november 2017" id="v6e-9A-SKh">
904+
<dateFormatter key="formatter" dateStyle="long" doesRelativeDateFormatting="YES" id="Iqa-cQ-Fcx"/>
889905
<font key="font" metaFont="system"/>
890906
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
891907
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
@@ -895,10 +911,14 @@
895911
<visibilityPriorities>
896912
<integer value="1000"/>
897913
<integer value="1000"/>
914+
<integer value="1000"/>
915+
<integer value="1000"/>
898916
</visibilityPriorities>
899917
<customSpacing>
900918
<real value="3.4028234663852886e+38"/>
901919
<real value="3.4028234663852886e+38"/>
920+
<real value="3.4028234663852886e+38"/>
921+
<real value="3.4028234663852886e+38"/>
902922
</customSpacing>
903923
</stackView>
904924
<stackView distribution="fill" orientation="horizontal" alignment="top" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tK7-LN-fxz">
@@ -981,7 +1001,8 @@
9811001
<outlet property="nationalityField" destination="rpO-KH-l0u" id="oC5-iU-eyB"/>
9821002
<outlet property="profileImage" destination="gjR-aj-CdO" id="smC-iN-OTe"/>
9831003
<outlet property="releasePlaceField" destination="eCF-F4-jCe" id="eer-8g-JtB"/>
984-
<outlet property="validityIntervalField" destination="Agz-HH-rck" id="yea-vp-WVY"/>
1004+
<outlet property="validEndField" destination="zhZ-1V-wOs" id="F5z-mu-nlH"/>
1005+
<outlet property="validStartField" destination="Agz-HH-rck" id="FKz-FC-tw2"/>
9851006
</connections>
9861007
</viewController>
9871008
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>

eidReader/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.0.2</string>
20+
<string>1.0.4</string>
2121
<key>CFBundleVersion</key>
2222
<string>3</string>
2323
<key>LSApplicationCategoryType</key>

eidReader/ViewController.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class ViewController: NSViewController {
1919
@IBOutlet weak var birthdayField: NSTextField!
2020
@IBOutlet weak var nationalIDField: NSTextField!
2121
@IBOutlet weak var cardNumberField: NSTextField!
22-
@IBOutlet weak var validityIntervalField: NSTextField!
22+
@IBOutlet weak var validStartField: NSTextField!
23+
@IBOutlet weak var validEndField: NSTextField!
2324
@IBOutlet weak var releasePlaceField: NSTextField!
2425
@IBOutlet weak var map: MKMapView!
2526

@@ -77,7 +78,8 @@ class ViewController: NSViewController {
7778
self.birthdayField.stringValue = ""
7879
self.nationalIDField.stringValue = ""
7980
self.cardNumberField.stringValue = ""
80-
self.validityIntervalField.stringValue = ""
81+
self.validStartField.stringValue = ""
82+
self.validEndField.stringValue = ""
8183
self.releasePlaceField.stringValue = ""
8284
if let address = self.currentAddress {self.map.removeAnnotation(address)}
8385
}
@@ -122,7 +124,8 @@ class ViewController: NSViewController {
122124
self.nationalIDField.stringValue = basicInfo.nationalIDNumber
123125

124126
self.cardNumberField.stringValue = basicInfo.cardNumber
125-
self.validityIntervalField.objectValue = DateInterval(start: basicInfo.validityStart, end: basicInfo.validityEnd)
127+
self.validStartField.objectValue = basicInfo.validityStart
128+
self.validEndField.objectValue = basicInfo.validityEnd
126129
self.releasePlaceField.stringValue = basicInfo.releasePlace
127130
}
128131
}
@@ -153,4 +156,3 @@ class ViewController: NSViewController {
153156

154157

155158
}
156-

0 commit comments

Comments
 (0)