Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Reads and writes NFC tags on iPhone using CoreNFC, covering NDEF messages, tag sessions, and background reading.
82% 100%+18 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 18 of 22 without it.
Show how to create a well-known text NDEF payload in Swift with the string 'Hello NFC' and English locale using iOS CoreNFC APIs.
Uses NFCNDEFPayload.wellKnownTypeTextPayload to format the payload
3 of 3 safety checks passed
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.
NFCReaderUsageDescription to Info.plist with a user-facing reason stringcom.apple.developer.nfc.readersession.formats entitlement with the current TAG value; do not add legacy NDEFcom.apple.developer.nfc.readersession.iso7816.select-identifiers in Info.plistcom.apple.developer.nfc.readersession.felica.systemcodes; do not use wildcard system codesNFC reading requires iPhone 7 or later. Always check for reader session availability before creating NFC UI or sessions. Use the concrete reader session type you are about to create.
import CoreNFC
guard NFCNDEFReaderSession.readingAvailable else {
// Device does not support NFC or feature is restricted
showUnsupportedMessage()
Next to this one in the catalogue, plus more from the same author.