<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoTokenKit",
  "identifier" : "/documentation/CryptoTokenKit/TKSmartCardATR",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CryptoTokenKit"
    ],
    "preciseIdentifier" : "c:objc(cs)TKSmartCardATR"
  },
  "title" : "TKSmartCardATR"
}
-->

# TKSmartCardATR

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

```
class TKSmartCardATR
```

## Overview

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

> Note:
> The ``doc://com.apple.cryptotokenkit/documentation/CryptoTokenKit/TKSmartCardATR`` class parses ATR messages according to the ISO/IEC 7816-3 specification.

## Topics

### Creating a Smart Card ATR

[`init(bytes:)`](/documentation/CryptoTokenKit/TKSmartCardATR/init(bytes:))

Initializes a `TKSmartCardATR` object from a provided data object.

[`init(source:)`](/documentation/CryptoTokenKit/TKSmartCardATR/init(source:))

Initializes a `TKSmartCardATR` object from a provided data source.

### Accessing ATR Attributes

[`protocols`](/documentation/CryptoTokenKit/TKSmartCardATR/protocols)

An array of protocols indicated in the ATR

[`bytes`](/documentation/CryptoTokenKit/TKSmartCardATR/bytes)

The ATR message data.

[`historicalBytes`](/documentation/CryptoTokenKit/TKSmartCardATR/historicalBytes)

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

[`historicalRecords`](/documentation/CryptoTokenKit/TKSmartCardATR/historicalRecords)

A list of compact TLV records parsed from historical bytes.

### Retrieving Interface Groups

[`interfaceGroup(at:)`](/documentation/CryptoTokenKit/TKSmartCardATR/interfaceGroup(at:))

Returns the interface group at the specified index.

[`interfaceGroup(for:)`](/documentation/CryptoTokenKit/TKSmartCardATR/interfaceGroup(for:))

Returns the interface group with the specified protocol.

[`TKSmartCardATR.InterfaceGroup`](/documentation/CryptoTokenKit/TKSmartCardATR/InterfaceGroup)

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



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)