Card commands
Lower-level command objects are useful when an app needs explicit control after scan() returns a connected transport.
let commands = UltralightCommands(transport: transport)
let pages = try await commands.readPages(startPage: 4)
try await commands.writePage(4, data: Data([0x01, 0x02, 0x03, 0x04]))
let desfire = DESFireCommands(transport: transport)
let version = try await desfire.getVersion()
let aids = try await desfire.getApplicationIDs()
let select = CommandAPDU.select(aid: passportAID)
let response = try await iso7816Transport.sendAPDU(select)
| Type | Use |
|---|---|
CardIdentifier | ATQA and SAK card-family classification. |
ISO14443 | CRC_A, CRC_B, and ATS parsing. |
ASN1Parser | BER-TLV parsing for eMRTD and card payloads. |