Reads and writes NFC tags on iOS using CoreNFC. Covers NDEF sessions, ISO 7816/15693/FeliCa/MIFARE communication, tag writing, background reading, and Xcode entitlements.
Ships in all-ios-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
NFCReaderUsageDescription to Info.plist.com.apple.developer.nfc.readersession.formats with array value ["TAG"] (do not use legacy NDEF).com.apple.developer.nfc.readersession.iso7816.select-identifiers.com.apple.developer.nfc.readersession.felica.systemcodes (no wildcards).Always verify NFCNDEFReaderSession.readingAvailable before presenting NFC UI.
Read NDEF tags using NFCNDEFReaderSession:
import CoreNFC
final class NFCReader: NSObject, NFCNDEFReaderSessionDelegate {
var session: NFCNDEFReaderSession?
func beginScan() {
guard NFCNDEFReaderSession.readingAvailable else { return }
session = NFCNDEFReaderSession(delegate: self, queue: nil, invalidateAfterFirstRead: true)
session?.alertMessage = "Hold iPhone near NFC tag."
session?.begin()
}
func readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs messages: [NFCNDEFMessage]) {
for message in messages {
for record in message.records {
// Process payload
}
}
}
func readerSession(_ session: NFCNDEFReaderSession, didInvalidateWithError error: Error) {
// Handle session timeout, cancellation, or hardware error
}
}
Connect to tags and write NDEF messages using NFCTagReaderSession:
func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) {
guard let tag = tags.first else { return }
session.connect(to: tag) { error in
guard error == nil else { session.invalidate(errorMessage: "Connection failed"); return }
guard case let .ndef(ndefTag) = tag else { return }
ndefTag.queryNDEFStatus { status, capacity, error in
guard status == .readWrite else { return }
let payload = NFCNDEFPayload.wellKnownTypeURIPayload(url: URL(string: "https://example.com")!)!
let message = NFCNDEFMessage(records: [payload])
ndefTag.writeNDEF(message) { error in
if error == nil {
session.alertMessage = "Write successful!"
session.invalidate()
}
}
}
}
}
Construct standardized NDEF payloads:
// URI Payload
let uriPayload = NFCNDEFPayload.wellKnownTypeURIPayload(url: destinationURL)!
// Text Payload
let textPayload = NFCNDEFPayload.wellKnownTypeTextPayload(string: "Device-101", locale: Locale(identifier: "en"))!
let message = NFCNDEFMessage(records: [uriPayload, textPayload])
Supported iPhones continuously scan for NDEF tags containing URL payloads when the screen is on:
.onOpenURL or UIKit scene(_:openURLContexts:).TAG in com.apple.developer.nfc.readersession.formats.session.invalidate() is explicitly called.NFCReaderError.readerSessionInvalidationErrorSessionTimeout.ndefTag.queryNDEFStatus and verify .readWrite status before attempting writes.NFCReaderUsageDescription configured in Info.plistcom.apple.developer.nfc.readersession.formats set to ["TAG"]What SKILL.md sets; muted values are Claude Code's defaults
/all-ios-skills:core-nfcfrom all-ios-skills
npx claudepluginhub thienqo/ios-skills --plugin all-ios-skills95 skills in this plugin
/accessorysetupkitDiscover and configure Bluetooth and Wi-Fi accessories using AccessorySetupKit. Use when presenting a privacy-preserving accessory picker, defining discovery descriptors for BLE or Wi-Fi devices, handling accessory session events, migrating from CoreBluetooth permission-based scanning, or setting up accessories without requiring broad Bluetooth permissions./activitykitBuild or review Live Activities and Dynamic Island experiences with ActivityKit, including lifecycle, layouts, push updates, and scheduled delivery. Use for time-sensitive Lock Screen or Dynamic Island state; route ordinary widgets to widgetkit./adattributionkitMeasure ad effectiveness with privacy-preserving attribution using AdAttributionKit. Use when registering ad impressions, handling attribution postbacks, updating conversion values, implementing re-engagement attribution, configuring publisher or advertiser apps, or replacing SKAdNetwork with AdAttributionKit for ad measurement.Other plugins' skills for the same job