Contents

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 -> Data

Parameters

  • request:

    The APDU request data.

  • reply:

    response

    The APDU response data, or nil if communication with the Smart Card failed.

    error

    Contains information about the the error preventing the transaction from being established.

    The NSError object 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.

See Also

Communicating with the Smart Card