Protocol

NFCISO15693Tag

An interface for interacting with an ISO 15693 tag.

Declaration

protocol NFCISO15693Tag

Overview

The NFCTagReaderSessionDelegate receives an object that conforms to the NFCISO15693Tag protocol when the NFCTagReaderSession detects an ISO 15693-compatible tag. For the delegate to receive the tag object, your app must include the Near Field Communication Tag Reader Session Formats Entitlement.

Topics

Getting Tag Information

var icManufacturerCode: Int

The IC manufacturer code of the tag.

Required.

var icSerialNumber: Data

The IC serial number assigned to the tag by the manufacturer.

Required.

var identifier: Data

The unique hardware identifier of the tag.

Required.

Selecting Request Flag Options

struct RequestFlag

A set of bit mask options that, when combined, define the request flags to use when sending a command.

Beta

Getting System Information

func getSystemInfo(requestFlags: RequestFlag, completionHandler: (Int, Int, Int, Int, Int, Error?) -> Void)

Sends the Get System Information command (0x2B command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta

Sending Single Block Commands

func readSingleBlock(requestFlags: RequestFlag, blockNumber: UInt8, completionHandler: (Data, Error?) -> Void)

Sends a Read Single Block command (0x20 command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta
func writeSingleBlock(requestFlags: RequestFlag, blockNumber: UInt8, dataBlock: Data, completionHandler: (Error?) -> Void)

Sends the Write Single Block command (0x21 command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta
func lockBlock(requestFlags: RequestFlag, blockNumber: UInt8, completionHandler: (Error?) -> Void)

Sends the Lock Block command (0x22 command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta

Sending Multi-block Commands

func readMultipleBlocks(requestFlags: RequestFlag, blockRange: NSRange, completionHandler: ([Data], Error?) -> Void)

Sends the Read Multiple Blocks command (0x23 command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta
func writeMultipleBlocks(requestFlags: RequestFlag, blockRange: NSRange, dataBlocks: [Data], completionHandler: (Error?) -> Void)

Sends the Write Multiple Blocks command (0x24 command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta
func getMultipleBlockSecurityStatus(requestFlags: RequestFlag, blockRange: NSRange, completionHandler: ([NSNumber], Error?) -> Void)

Sends the Get Multiple Block Security Status command (0x2C command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta

Sending Application Family Identifier Commands

func writeAFI(requestFlags: RequestFlag, afi: UInt8, completionHandler: (Error?) -> Void)

Sends the Write AFI command (0x27 command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta
func lockAFI(requestFlags: RequestFlag, completionHandler: (Error?) -> Void)

Sends the Lock AFI command (0x28 command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta

Sending Data Storage Format Identifier Commands

func writeDSFID(requestFlags: RequestFlag, dsfid: UInt8, completionHandler: (Error?) -> Void)

Sends the Write DSFID command (0x29 command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta
func lockDFSID(requestFlags: RequestFlag, completionHandler: (Error?) -> Void)

Sends the Lock DSFID command (0x2A command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta

Sending Reset to Ready Command

func resetToReady(requestFlags: RequestFlag, completionHandler: (Error?) -> Void)

Sends the Reset To Ready command (0x26 command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta

Sending Select Command

func select(requestFlags: RequestFlag, completionHandler: (Error?) -> Void)

Sends the Select command (0x25 command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta

Sending Stay Quiet Command

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

Sends a Stay Quiet command (0x02 command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta

Sending Custom Commands

func customCommand(requestFlags: RequestFlag, customCommandCode: Int, customRequestParameters: Data, completionHandler: (Data, Error?) -> Void)

Sends a custom command (0xA0 to 0xDF command code), as defined in the ISO 15693-3 specification, to the tag.

Required.

Beta

Sending Extended Commands

func extendedReadSingleBlock(requestFlags: RequestFlag, blockNumber: Int, completionHandler: (Data, Error?) -> Void)

Sends the Extended Read Single Block command (0x30 command code), as defined in the NFC Forum Type 5 tag specification, to the tag.

Required.

Beta
func extendedWriteSingleBlock(requestFlags: RequestFlag, blockNumber: Int, dataBlock: Data, completionHandler: (Error?) -> Void)

Sends the Extended Write Single Block command (0x31 command code), as defined in the NFC Forum Type 5 tag specification, to the tag.

Required.

Beta
func extendedLockBlock(requestFlags: RequestFlag, blockNumber: Int, completionHandler: (Error?) -> Void)

Sends the Extended Lock Single Block command (0x32 command code), as defined in the NFC Forum Type 5 tag specification, to the tag.

Required.

Beta
func extendedReadMultipleBlocks(requestFlags: RequestFlag, blockRange: NSRange, completionHandler: ([Data], Error?) -> Void)

Sends the Extended Read Multiple Block command (0x33 command code), as defined in the NFC Forum Type 5 tag specification, to the tag.

Required.

Beta

Getting Response Errors

let NFCISO15693TagResponseErrorKey: String

A user information dictionary key indicating that a tag responded with a command error.

Relationships

Inherits From

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 NFCFeliCaTag

An interface for interacting with a FeliCa tag.

Beta
protocol NFCMiFareTag

An interface for interacting with a MIFARE tag.

Beta
protocol NFCNDEFTag

An interface for interacting with an NDEF 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