An interface for interacting with an NDEF tag.


protocol NFCNDEFTag


Getting the Tag Status

var isAvailable: Bool

A Boolean value that determines whether the NDEF tag is available in the current reader session.


func queryNDEFStatus(completionHandler: (NFCNDEFStatus, Int, Error?) -> Void)

Asks the reader session for the NDEF support status of the tag.


enum NFCNDEFStatus

Constants that indicate status for an NDEF tag.

Reading the Tag

func readNDEF(completionHandler: (NFCNDEFMessage?, Error?) -> Void)

Retrieves an NDEF message from the tag.


Writing to the Tag

func writeNDEF(NFCNDEFMessage, completionHandler: (Error?) -> Void)

Saves an NDEF message to a writable tag.


func writeLock(completionHandler: (Error?) -> Void)

Changes the NDEF tag status to read-only, preventing future write operations.


See Also

Tag Types

Creating NFC Tags from Your iPhone

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

protocol NFCISO7816Tag

An interface for interacting with an ISO 7816 tag.

protocol NFCISO15693Tag

An interface for interacting with an ISO 15693 tag.

protocol NFCFeliCaTag

An interface for interacting with a FeliCa™ tag.

protocol NFCMiFareTag

An interface for interacting with a MIFARE® tag.

enum NFCTag

An object that represents an NFC tag object.

class NFCTagCommandConfiguration

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