core-nfc

Read and write NFC tags on iOS using CoreNFC across NDEF and native protocols.

Updated May 6, 2026
One-click install
npx skills add https://github.com/Roy-wonji/claude-config --skill core-nfc-roy-wonji
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: core-nfc
Source: https://github.com/Roy-wonji/claude-config/tree/main/skills/swift-ios-skills/skills/core-nfc
Command: npx skills add https://github.com/Roy-wonji/claude-config --skill core-nfc-roy-wonji

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the problem of building reliable NFC tag scanning and writing flows on iPhone so you can read and create NDEF content without runtime crashes or incorrect session handling.

Core Features & Use Cases

  • NDEF tag reading: Reads NDEF messages and iterates records for URLs, text, MIME, and external payloads.
  • Native tag protocol access: Uses NFCTagReaderSession to work with ISO7816, ISO15693, FeliCa, and MIFARE tags via connected tag operations.
  • NDEF writing & safety checks: Constructs NFCNDEFPayload/NFCNDEFMessage and writes only after verifying the tag is readWrite.
  • Entitlements and background reading: Guides required NFC entitlements and supports iOS background tag reading using NSUserActivity.
  • Quality guardrails: Covers common mistakes like missing entitlements, forgetting readingAvailable, mis-handling invalidation errors, and stale session references.

Quick Start

Use the core-nfc skill to implement an iOS NFC flow that checks NFCNDEFReaderSession.readingAvailable, starts NFCNDEFReaderSession, parses NFCNDEFMessage records, and writes a URL payload only after confirming NDEF status is read-write.

Frequently Asked Questions about core-nfc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read and write NFC tags in iOS using CoreNFC?

You can read and write NFC tags in iOS using CoreNFC by implementing NFCNDEFReaderSession delegate flows to parse NDEF messages and constructing NFCNDEFPayload objects, writing only after verifying the tag is readWrite.

Why does my CoreNFC NFCNDEFReaderSession crash on iPhone?

Your CoreNFC NFCNDEFReaderSession crashes likely due to missing NFC entitlements, skipping NFCNDEFReaderSession.readingAvailable checks, or improper invalidation error handling during the session delegate lifecycle.

Do I need special entitlements for NFC tag reading and background reading in Swift?

Yes, NFC tag reading and background tag reading in Swift require specific NFC entitlements configured in your project, plus handling NSUserActivity to receive background detection events for compatible tags.

Can I access ISO7816, ISO15693, FeliCa, and MIFARE tags with CoreNFC?

Yes, you can access ISO7816, ISO15693, FeliCa, and MIFARE tags with CoreNFC by initiating an NFCTagReaderSession, which provides native tag protocol access for connected tag operations beyond standard NDEF.

What is the best way to construct an NDEF payload for an NFC URL on iOS?

The best way to construct an NDEF payload for an NFC URL on iOS is to build NFCNDEFPayload objects wrapped in an NFCNDEFMessage, ensuring you verify the tag's NDEF status is readWrite before attempting the write operation.

How does iOS background tag reading work with NSUserActivity?

iOS background tag reading works with NSUserActivity by automatically detecting compatible NFC tags while the app is in the background and delivering the NDEF payload through an NSUserActivity object for the app to process.