Skip to content

Commit 0440510

Browse files
authored
Version 5.8.0 (#25)
1 parent fcf92b6 commit 0440510

File tree

5 files changed

+32
-21
lines changed

5 files changed

+32
-21
lines changed

ReleaseNotes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Release 5.8.0
2+
3+
## Changed
4+
5+
- Set access level of NFCCardReaderProvider entities to public
6+
7+
## Fixed
8+
9+
- Prevent NFCHealthCardSession's continuation from being called twice
10+
111
# Release 5.7.0
212

313
## Changed

Sources/NFCCardReaderProvider/Card/NFCCard.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ import Foundation
2323
import GemCommonsKit
2424
import HealthCardAccess
2525

26-
class NFCCard: CardType {
26+
public class NFCCard: CardType {
2727
var tag: NFCISO7816Tag?
2828
private weak var basicChannel: NFCCardChannel?
2929

30-
init(isoTag tag: NFCISO7816Tag) {
30+
public init(isoTag tag: NFCISO7816Tag) {
3131
self.tag = tag
3232
}
3333

34-
var atr: ATR {
34+
public var atr: ATR {
3535
tag?.historicalBytes ?? Data()
3636
}
3737

38-
var `protocol`: CardProtocol {
38+
public var `protocol`: CardProtocol {
3939
.t1
4040
}
4141

42-
func openBasicChannel() throws -> CardChannelType {
42+
public func openBasicChannel() throws -> CardChannelType {
4343
if let channel = basicChannel {
4444
return channel
4545
}
@@ -51,7 +51,7 @@ class NFCCard: CardType {
5151
return nfcChannel
5252
}
5353

54-
func openLogicChannel() throws -> CardChannelType {
54+
public func openLogicChannel() throws -> CardChannelType {
5555
guard let tag = tag else {
5656
throw NFCCardError.noCardPresent.illegalState
5757
}
@@ -74,7 +74,7 @@ class NFCCard: CardType {
7474
return NFCCardChannel(card: self, tag: tag, channelNo: Int(rspData[0]))
7575
}
7676

77-
func openLogicChannelAsync() async throws -> CardChannelType {
77+
public func openLogicChannelAsync() async throws -> CardChannelType {
7878
guard let tag = tag else {
7979
throw NFCCardError.noCardPresent.illegalState
8080
}
@@ -97,15 +97,15 @@ class NFCCard: CardType {
9797
return NFCCardChannel(card: self, tag: tag, channelNo: Int(rspData[0]))
9898
}
9999

100-
func initialApplicationIdentifier() throws -> Data? {
100+
public func initialApplicationIdentifier() throws -> Data? {
101101
guard let initialSelectedAID = tag?.initialSelectedAID else {
102102
ALog("NFC tag could not deliver initialSelectedAID when expected")
103103
return nil
104104
}
105105
return try Data(hex: initialSelectedAID)
106106
}
107107

108-
func disconnect(reset _: Bool) throws {
108+
public func disconnect(reset _: Bool) throws {
109109
DLog("Disconnecting card ...")
110110
tag = nil
111111
basicChannel = nil

Sources/NFCCardReaderProvider/Card/NFCCardChannel.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,28 @@ import Foundation
2323
import GemCommonsKit
2424
import Helper
2525

26-
class NFCCardChannel: CardChannelType {
27-
let maxMessageLength = 0x10000
28-
let maxResponseLength = 0x10000
26+
public class NFCCardChannel: CardChannelType {
27+
public let maxMessageLength = 0x10000
28+
public let maxResponseLength = 0x10000
2929

30-
let channelNumber: Int
30+
public let channelNumber: Int
3131
var tag: NFCISO7816Tag?
32-
let extendedLengthSupported = true
32+
public let extendedLengthSupported = true
3333

3434
private let nfcCard: NFCCard
3535

36-
init(card: NFCCard, tag: NFCISO7816Tag, channelNo: Int = 0) {
36+
public init(card: NFCCard, tag: NFCISO7816Tag, channelNo: Int = 0) {
3737
nfcCard = card
3838
self.tag = tag
3939
channelNumber = channelNo
4040
}
4141

42-
var card: CardType {
42+
public var card: CardType {
4343
nfcCard
4444
}
4545

4646
@available(*, deprecated, message: "Use structured concurrency version instead")
47-
func transmit( // swiftlint:disable:this function_body_length
47+
public func transmit( // swiftlint:disable:this function_body_length
4848
command: CommandType,
4949
writeTimeout _: TimeInterval,
5050
readTimeout: TimeInterval
@@ -107,7 +107,7 @@ class NFCCardChannel: CardChannelType {
107107
}
108108
}
109109

110-
func transmitAsync(
110+
public func transmitAsync(
111111
command: CommandType,
112112
writeTimeout _: TimeInterval,
113113
readTimeout _: TimeInterval
@@ -149,7 +149,7 @@ class NFCCardChannel: CardChannelType {
149149
return try APDU.Response(body: data, sw1: sw1, sw2: sw2)
150150
}
151151

152-
func close() throws {
152+
public func close() throws {
153153
defer {
154154
tag = nil
155155
}
@@ -172,7 +172,7 @@ class NFCCardChannel: CardChannelType {
172172
}
173173
}
174174

175-
func closeAsync() async throws {
175+
public func closeAsync() async throws {
176176
defer {
177177
tag = nil
178178
}

Sources/NFCCardReaderProvider/NFCHealthCardSession.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ public class NFCHealthCardSession<Output>: NSObject, NFCTagReaderSessionDelegate
274274
do {
275275
let outcome = try await operation(myNFCCardSession)
276276
operationContinuation?.resume(returning: outcome)
277+
operationContinuation = nil
277278
} catch let error as CoreNFCError {
278279
operationContinuation?.resume(throwing: NFCHealthCardSessionError.coreNFC(error))
279280
operationContinuation = nil

Sources/NFCDemo/Resources/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>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.2.6</string>
20+
<string>1.2.7</string>
2121
<key>CFBundleVersion</key>
2222
<string>$(GEMATIK_BUNDLE_VERSION)</string>
2323
<key>GEMATIKSourceVersion</key>

0 commit comments

Comments
 (0)