Framework

Core NFC

Detect NFC tags, read messages that contain NDEF data, and save data to writable tags.

Overview

Your app can read tags to give users more information about their physical environment and the real-world objects in it. Using Core NFC, you can read Near Field Communication (NFC) tags of types 1 through 5 that contain data in the NFC Data Exchange Format (NDEF). For example, your app might give users information about products they find in a store or exhibits they visit in a museum.

Your app can also write data to tags, and interact with protocol specific tag such as ISO 7816, ISO 15693, FeliCa™, and MIFARE® tags.

Core NFC is not available for use in app extensions, and it requires a device that supports Near Field Communication. To determine if support is available, check the readingAvailable class property before starting a reader session.

Topics

Essentials

Building an NFC Tag-Reader App

Read NFC tags with NDEF messages in your app.

Adding Support for Background Tag Reading

Allow users to scan NFC tags without an app using background tag reading.

property list key NFCReaderUsageDescription

A message that tells the user why the app is requesting access to the device’s NFC hardware.

Name: Privacy - NFC Scan Usage Description

Reader Sessions

Create a reader session to scan and detect NFC tags.

NFCNDEFReaderSession

A reader session for detecting NFC Data Exchange Format (NDEF) tags.

NFCTagReaderSession

A reader session for detecting ISO7816, ISO15693, FeliCa, and MIFARE tags.

NFCVASReaderSession

A reader session for processing Value Added Service (VAS) tags.

NFCReaderSession

The abstract base class that represents a reader session for detecting NFC tags.

NFCReaderSession

A general interface for interacting with a reader session.

NFCReaderSessionDelegate

A collection of callbacks that provide information about the status of an NFC reader session.

Near Field Communication Tag Reader Session Formats Entitlement

The Near Field Communication data formats the app is allowed to read.

Key: com.apple.developer.nfc.readersession.formats

Tag Types

Read tag data, and save data to writable tags, by using the appropriate tag type interface.

Creating NFC Tags from Your iPhone

Save data to tags, and interact with them using native tag protocols.

NFCISO7816Tag

An interface for interacting with an ISO 7816 tag.

NFCISO15693Tag

An interface for interacting with an ISO 15693 tag.

NFCFeliCaTag

An interface for interacting with a FeliCa™ tag.

NFCMiFareTag

An interface for interacting with a MIFARE® tag.

NFCNDEFTag

An interface for interacting with an NDEF tag.

NFCTag

An interface for interacting with an NFC or RFID tag.

NFCTagCommandConfiguration

A set of parameters you use to define the configuration of an NFC tag command.

NDEF Messages and Payloads

NFCNDEFMessage

An NFC NDEF message consisting of an array of payload records.

NFCNDEFPayload

A payload record in an NFC NDEF message.

Errors

NFCReaderError

Reader session and tag error codes.

NFCErrorDomain

The domain for errors associated with Core NFC APIs.

NFCTagResponseUnexpectedLengthErrorKey

A user-information dictionary key that indicates an invalid received response packet length.