CoreExtendedNFC
Swift package for NFC protocol-layer logic on iOS. CoreNFC handles RF transport; CoreExtendedNFC identifies cards, builds commands, models memory, reads passports, and exports dumps.
Capabilities
- Card identification from ATQA, SAK, ATS, FeliCa system code, ISO 15693 metadata, and ISO 7816 application hints.
- Memory operations for Ultralight, NTAG, DESFire, FeliCa Type 3, ISO 15693, and Type 4 NDEF tags.
- Passport and eMRTD reading with BAC, Secure Messaging, data-group parsing, Passive Authentication, and Active Authentication.
- Transit-card readers for Japan IC, Hong Kong Octopus, China T-Union, and Korea KS X 6924 paths.
- Japan My Number card token reads, protected individual-number reads, and PIN-attempt lookup.
- Dump export and import for hex, JSON, Flipper NFC, Proxmark3 MFU, libnfc MFD, and raw binary formats.
Install
dependencies: [
.package(url: "https://github.com/Lakr233/CoreExtendedNFC.git", from: "0.1.0"),
],
targets: [
.target(name: "App", dependencies: [
.product(name: "CoreExtendedNFC", package: "CoreExtendedNFC"),
]),
]
Quick start
import CoreExtendedNFC
let (card, transport, session) = try await CoreExtendedNFC.scan()
print(card.type.description, card.uid.hexString)
session.invalidate()
let (info, dump) = try await CoreExtendedNFC.scanAndDump()
print(dump.exportHex())
let passport = try await CoreExtendedNFC.readPassport(
mrzKey: "L898902C<3640812512041598",
dataGroups: [.dg1, .dg2]
)
Supported cards
| Family | Identify | Read | Write | Dump |
|---|---|---|---|---|
| MIFARE Ultralight / EV1 | yes | yes | yes | yes |
| NTAG 213 / 215 / 216 | yes | yes | yes | yes |
| MIFARE DESFire EV1-EV3 | yes | yes | free-access files | yes |
| FeliCa Type 3 NDEF | yes | yes | yes | partial |
| ISO 15693 / Type 5 | yes | yes | yes | yes |
| Type 4 NDEF / ISO 7816 | yes | yes | yes | partial |
| eMRTD / ePassport | yes | yes | no | workflow-specific |
| My Number card | yes | yes | no | token data |
| MIFARE Classic 1K / 4K | yes | no | no | no |
MIFARE Classic is identification-only because iOS does not expose Crypto1 parity-bit authentication.
Where next
- GuideTask-oriented scanning, dump, NDEF, passport, transit, My Number, and Info.plist setup notes.
- API referencePublic Swift surface grouped by top-level API, card commands, models, and protocol helpers.
- Research notesReal-card validation, iOS polling identifiers, transit-card findings, and My Number data layout.