A parsed ATR (Answer To Reset) message from a Smart Card.


class TKSmartCardATR : NSObject


This class declares a programmatic interface to parsing an ATR from data or a byte stream, and accessing the individual parts.


Creating a Smart Card ATR

init?(bytes: Data)

Initializes a TKSmartCardATR object from a provided data object.

init?(source: () -> Int32)

Initializes a TKSmartCardATR object from a provided data source.

Accessing ATR Attributes

var protocols: [NSNumber]

An array of protocols indicated in the ATR

var bytes: Data

The ATR message data.

var historicalBytes: Data

The ATR historical bytes, not including interface bytes or the TCK (check byte).

var historicalRecords: [TKCompactTLVRecord]?

A list of compact TLV records parsed from historical bytes.

Retrieving Interface Groups

func interfaceGroup(at: Int) -> TKSmartCardATR.InterfaceGroup?

Returns the interface group at the specified index.

func interfaceGroup(for: TKSmartCardProtocol) -> TKSmartCardATR.InterfaceGroup?

Returns the interface group with the specified protocol.

class TKSmartCardATR.InterfaceGroup

A single interface-bytes group for a Smart Card ATR (Answer to Reset).


Inherits From

Conforms To

See Also

Reading the Answer to Reset

var atr: TKSmartCardATR?

The ATR (Answer to Reset) of the inserted Smart Card, or nil if no Smart Card is inserted or the inserted Smart Card is mute.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software