diff --git a/CHANGELOG b/CHANGELOG index 98102d76..c4dcd2e7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +v2.0.1 + Updated to latest version of OpenSSL - 1.1.1900 + Fixed warnings of publishing updates on background thread when scanning MRZ (example SPM) + DataGroup12 class is now public (PR152) - thanks @recp + Improved compatibility with some documents by omitting LE (PR153) - set LE to -1 for commands not expected to return data - thanks @TimoTegtmeier + v2.0.0 Switched app over to user async/await - makes the code paths much simpler Added fix for DG11 names - thanks @TerjeLon diff --git a/Examples/Example_SPM/NFCPassportReaderApp/MrzScanner/VisionViewController.swift b/Examples/Example_SPM/NFCPassportReaderApp/MrzScanner/VisionViewController.swift index aa776ca2..fa2489cd 100644 --- a/Examples/Example_SPM/NFCPassportReaderApp/MrzScanner/VisionViewController.swift +++ b/Examples/Example_SPM/NFCPassportReaderApp/MrzScanner/VisionViewController.swift @@ -91,7 +91,11 @@ public class VisionViewController: ViewController { if let sureNumber = mrzTracker.getStableString() { showString(string: sureNumber) mrzTracker.reset(string: sureNumber) - completionHandler?(sureNumber) + + DispatchQueue.main.async { + self.completionHandler?(sureNumber) + } + } } diff --git a/NFCPassportReader.podspec b/NFCPassportReader.podspec index 698a64fe..dd978fd9 100644 --- a/NFCPassportReader.podspec +++ b/NFCPassportReader.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |spec| spec.name = "NFCPassportReader" - spec.version = "1.1.9" + spec.version = "2.0.1" spec.summary = "This package handles reading an NFC Enabled passport using iOS 13 CoreNFC APIS" spec.homepage = "https://github.com/AndyQ/NFCPassportReader" @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| spec.swift_version = "5.0" - spec.dependency "OpenSSL-Universal", '1.1.180' + spec.dependency "OpenSSL-Universal", '1.1.1900' spec.xcconfig = { 'OTHER_LDFLAGS' => '-weak_framework CryptoKit -weak_framework CoreNFC -weak_framework CryptoTokenKit' } spec.pod_target_xcconfig = { diff --git a/Package.swift b/Package.swift index c5676c51..72fffade 100644 --- a/Package.swift +++ b/Package.swift @@ -15,7 +15,7 @@ let package = Package( dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), - .package(url: "https://github.com/krzyzanowskim/OpenSSL.git", .upToNextMinor(from: "1.1.180")) + .package(url: "https://github.com/krzyzanowskim/OpenSSL.git", .upToNextMinor(from: "1.1.1900")) ], targets: [ diff --git a/Sources/NFCPassportReader/DataGroups/DataGroup12.swift b/Sources/NFCPassportReader/DataGroups/DataGroup12.swift index 561abdca..c29a409e 100644 --- a/Sources/NFCPassportReader/DataGroups/DataGroup12.swift +++ b/Sources/NFCPassportReader/DataGroups/DataGroup12.swift @@ -7,7 +7,7 @@ import Foundation @available(iOS 13, macOS 10.15, *) -class DataGroup12 : DataGroup { +public class DataGroup12 : DataGroup { public private(set) var issuingAuthority : String? public private(set) var dateOfIssue : String? diff --git a/Sources/NFCPassportReader/TagReader.swift b/Sources/NFCPassportReader/TagReader.swift index ddd949b6..eb7a072d 100644 --- a/Sources/NFCPassportReader/TagReader.swift +++ b/Sources/NFCPassportReader/TagReader.swift @@ -112,7 +112,7 @@ public class TagReader { let data = oidBytes + keyTypeBytes - let cmd = NFCISO7816APDU(instructionClass: 00, instructionCode: 0x22, p1Parameter: 0xC1, p2Parameter: 0xA4, data: Data(data), expectedResponseLength: 256) + let cmd = NFCISO7816APDU(instructionClass: 00, instructionCode: 0x22, p1Parameter: 0xC1, p2Parameter: 0xA4, data: Data(data), expectedResponseLength: -1) return try await send( cmd: cmd ) } @@ -222,7 +222,7 @@ public class TagReader { // By executing above SELECT command (with data=0x3F00) master file should be selected and you should be able to read EF.CardAccess from passport. // First select master file - let cmd : NFCISO7816APDU = NFCISO7816APDU(instructionClass: 0x00, instructionCode: 0xA4, p1Parameter: 0x00, p2Parameter: 0x0C, data: Data([0x3f,0x00]), expectedResponseLength: 256) + let cmd : NFCISO7816APDU = NFCISO7816APDU(instructionClass: 0x00, instructionCode: 0xA4, p1Parameter: 0x00, p2Parameter: 0x0C, data: Data([0x3f,0x00]), expectedResponseLength: -1) _ = try await send( cmd: cmd)