Scan and dump

Use the top-level API when the app owns the NFC session. Keep the returned session alive while sending commands through the transport.

Scan

let (info, transport, session) = try await CoreExtendedNFC.scan()
defer { session.invalidate() }

Identification refinement

scan() first maps the CoreNFC tag family into a coarse CardType, then refines that result with family-specific probes where iOS exposes safe commands.

For MIFARE Type 2 tags, CoreNFC may only expose an unknown MIFARE family. If the coarse result looks like MIFARE Classic, CoreExtendedNFC validates the Type 2 manufacturer pages with READ 0x30 0x00 and the UID BCC bytes before retrying the Ultralight / NTAG GET_VERSION path. Real MIFARE Classic cards remain identification-only because iOS does not expose Crypto1 authentication.

Dump

let (info, dump) = try await CoreExtendedNFC.scanAndDump()
print(dump.summary.userSummary)

Export

let json = try CoreExtendedNFC.exportJSON(dump: dump)
let flipper = try CoreExtendedNFC.exportFlipperNFC(dump: dump)
let artifacts = try CoreExtendedNFC.exportAll(dump: dump)