transmit(_:reply:)
Transmits data in Application Protocol Data Unit (APDU) format to the Smart Card.
Declaration
func transmit(_ request: Data, reply: @escaping @Sendable (Data?, (any Error)?) -> Void)func transmit(_ request: Data) async throws -> DataParameters
- request:
The APDU request data.
- reply:
- response
The APDU response data, or
nilif communication with the Smart Card failed.- error
Contains information about the the error preventing the transaction from being established.
The
NSErrorobject is created in the Tkerrordomain domain with a code in the Code enumeration.
Discussion
You should only call this method after a session to the Smart Card has been established using the beginSession(reply:) method, and before the session is terminated using the endSession() method.