← 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.
dpearson2699/swift-ios-skills · ★ 730 · AI & Automation · score 80
Install: claude install-skill dpearson2699/swift-ios-skills
# CoreNFC Read and write NFC tags on iPhone using the CoreNFC framework. Covers NDEF reader sessions, tag reader sessions, NDEF message construction, entitlements, and background tag reading. Targets Swift 6.3 / iOS 26+. ## Contents - [Setup](#setup) - [NDEF Reader Session](#ndef-reader-session) - [Tag Reader Session](#tag-reader-session) - [Writing NDEF Messages](#writing-ndef-messages) - [NDEF Payload Types](#ndef-payload-types) - [Background Tag Reading](#background-tag-reading) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Setup ### Project Configuration 1. Add the **Near Field Communication Tag Reading** capability in Xcode 2. Add `NFCReaderUsageDescription` to Info.plist with a user-facing reason string 3. Add the `com.apple.developer.nfc.readersession.formats` entitlement with the tag types your app reads (e.g., `NDEF`, `TAG`) 4. For ISO 7816 tags, add supported application identifiers to `com.apple.developer.nfc.readersession.iso7816.select-identifiers` in Info.plist ### Device Requirements NFC reading requires iPhone 7 or later. Always check for reader session availability before presenting NFC UI. ```swift import CoreNFC guard NFCNDEFReaderSession.readingAvailable else { // Device does not support NFC or feature is restricted showUnsupportedMessage() return } ``` ### Key Types | Type | Role | |---|---| | `NFCNDEFReaderSession` | Scans for NDEF-formatted tags | | `NFCTagReaderSessi