Protocol

NFCNDEFTag

An interface for interacting with an NDEF tag.

Declaration

protocol NFCNDEFTag

Topics

Getting the Tag Status

var isAvailable: Bool

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

Required.

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

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

Required.

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.

Required.

Writing to the Tag

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

Saves an NDEF message to a writable tag.

Required.

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

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

Required.

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.

Beta
protocol NFCISO15693Tag

An interface for interacting with an ISO 15693 tag.

protocol NFCFeliCaTag

An interface for interacting with a FeliCa tag.

Beta
protocol NFCMiFareTag

An interface for interacting with a MIFARE tag.

Beta
class NFCTagCommandConfiguration

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software