core-nfc
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.
Security Assessment
About core-nfc
The core-nfc skill provides comprehensive support for reading and writing NFC tags on iOS devices using Apple's CoreNFC framework. It enables developers to implement NFC functionality in their iOS applications, allowing users to interact with physical NFC tags for various use cases such as contactless payments, product authentication, smart posters, and device pairing. The skill covers both NDEF (NFC Data Exchange Format) operations for standardized data interchange and lower-level tag protocols including ISO7816, ISO15693, FeliCa, and MIFARE.
This skill supports multiple NFC operations including scanning NDEF-formatted tags, reading tag-specific protocols, writing NDEF messages to writable tags, and managing NFC session lifecycles. It provides guidance on proper entitlement configuration, Info.plist setup, and handling different tag types. The skill includes patterns for both foreground scanning sessions and background tag reading, allowing apps to respond to NFC tags even when not actively running. It covers essential NDEF payload types such as URLs, text records, and MIME data.
The skill is designed for iOS developers building applications that require NFC capabilities, particularly those working on Swift projects targeting iOS 26+ with Swift 6.3. It's especially valuable for developers implementing contactless check-in systems, loyalty programs, smart product labels, access control systems, or any application requiring physical-to-digital interactions through NFC technology. The skill emphasizes proper error handling, session management, and adherence to Apple's NFC guidelines to ensure reliable and user-friendly NFC experiences.
FAQ
What iOS devices support NFC reading with CoreNFC?
NFC reading requires iPhone 7 or later. Always check NFCNDEFReaderSession.readingAvailable or NFCTagReaderSession.readingAvailable before creating NFC UI or sessions, as the feature may be restricted on some devices or regions.
What's the difference between NFCNDEFReaderSession and NFCTagReaderSession?
NFCNDEFReaderSession is used for reading NDEF-formatted data like URLs, text, and MIME content from tags. NFCTagReaderSession provides lower-level access to specific tag protocols (ISO7816, ISO15693, FeliCa, MIFARE) and is required for writing operations or reading non-NDEF formatted tags.
What entitlements and Info.plist keys are required for NFC?
You need the Near Field Communication Tag Reading capability, NFCReaderUsageDescription in Info.plist, and the com.apple.developer.nfc.readersession.formats entitlement with 'TAG' value. For ISO7816 tags, add application identifiers to com.apple.developer.nfc.readersession.iso7816.select-identifiers. For FeliCa, add system codes to com.apple.developer.nfc.readersession.felica.systemcodes.
Can my app read NFC tags when running in the background?
Yes, the skill covers background tag reading functionality, allowing apps to respond to NFC tags even when not actively running. This requires proper configuration and handling of background tag reading sessions.
Which tag types and protocols are supported?
The skill supports NDEF-formatted tags for standardized data, as well as ISO7816, ISO15693, FeliCa, and MIFARE tag protocols for lower-level operations. It covers reading and writing NDEF messages with various payload types including URLs, text records, and MIME data.
Install core-nfc
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
dpearson2699/swift-ios-skills