diff --git a/CHANGELOG b/CHANGELOG index 95f30869..738c9ae5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +v2.0.0 + Switched app over to user async/await - makes the code paths much simpler + Added fix for DG11 names - thanks @TerjeLon + Added fix for missing reader session invalidation - thanks @TerjeLon + v1.1.9 Retrieves names from DG11 if present otherwise fall back to DG1 - thanks @TerjeLon Fixed bug with Chip Authentication - thanks @pauphi and @jennytellne-cygni diff --git a/Sources/NFCPassportReader/NFCPassportModel.swift b/Sources/NFCPassportReader/NFCPassportModel.swift index 3ea96d95..973c4348 100644 --- a/Sources/NFCPassportReader/NFCPassportModel.swift +++ b/Sources/NFCPassportReader/NFCPassportModel.swift @@ -49,7 +49,7 @@ public class NFCPassportModel { // Extract fields from DG11 if present private lazy var names : [String] = { guard let dg11 = dataGroupsRead[.DG11] as? DataGroup11, - let fullName = dg11.fullName?.components(separatedBy: " ") else { return (passportDataElements?["5B"] ?? "?").components(separatedBy: "<<") } + let fullName = dg11.fullName?.components(separatedBy: "<<") else { return (passportDataElements?["5B"] ?? "?").components(separatedBy: "<<") } return fullName }() diff --git a/Sources/NFCPassportReader/PassportReader.swift b/Sources/NFCPassportReader/PassportReader.swift index 976624ce..aad7c52d 100644 --- a/Sources/NFCPassportReader/PassportReader.swift +++ b/Sources/NFCPassportReader/PassportReader.swift @@ -118,6 +118,7 @@ extension PassportReader : NFCTagReaderSessionDelegate { // If necessary, you may handle the error. Note session is no longer valid. // You must create a new session to restart RF polling. Log.debug( "tagReaderSession:didInvalidateWithError - \(error.localizedDescription)" ) + self.readerSession?.invalidate() self.readerSession = nil if let readerError = error as? NFCReaderError, readerError.code == NFCReaderError.readerSessionInvalidationErrorUserCanceled