← ClaudeAtlas

core-nfclisted

Read and write NFC tags using CoreNFC. Use when scanning NDEF tags, reading ISO7816/ISO15693/FeliCa/MIFARE tags, writing NDEF messages, handling NFC session lifecycle, configuring NFC entitlements, or implementing background tag reading in iOS apps.
thienqo/ios-skills · ★ 11 · AI & Automation · score 69
Install: claude install-skill thienqo/ios-skills
# CoreNFC Read and write NFC tags on iPhone using CoreNFC. Supports NDEF tag reader sessions, native ISO 7816/15693/FeliCa/MIFARE tag communication, and background tag reading. ## Contents - [Setup & Entitlements](#setup--entitlements) - [NDEF Reader Session](#ndef-reader-session) - [Tag Reader Session & Writing](#tag-reader-session--writing) - [NDEF Message Construction](#ndef-message-construction) - [Background Tag Reading](#background-tag-reading) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Setup & Entitlements 1. Enable **Near Field Communication Tag Reading** capability in Xcode. 2. Add `NFCReaderUsageDescription` to Info.plist. 3. Configure the entitlement `com.apple.developer.nfc.readersession.formats` with array value `["TAG"]` (do not use legacy `NDEF`). 4. For ISO 7816 tags, add application identifiers to `com.apple.developer.nfc.readersession.iso7816.select-identifiers`. 5. For FeliCa tags, specify exact system codes in `com.apple.developer.nfc.readersession.felica.systemcodes` (no wildcards). Always verify `NFCNDEFReaderSession.readingAvailable` before presenting NFC UI. ## NDEF Reader Session Read NDEF tags using `NFCNDEFReaderSession`: ```swift import CoreNFC final class NFCReader: NSObject, NFCNDEFReaderSessionDelegate { var session: NFCNDEFReaderSession? func beginScan() { guard NFCNDEFReaderSession.readingAvailable else { return } session = NFCNDEFReaderSession