Protocol

NFCISO7816Tag

An interface for interacting with an ISO 7816 tag.

Declaration

protocol NFCISO7816Tag

Overview

The NFCTagReaderSessionDelegate receives an object that conforms to the NFCISO7816Tag protocol when the NFCTagReaderSession detects an ISO 7816-compatible tag. For the delegate to receive the tag object, your app must include:

When the session discovers a compatible ISO 7816 tag, the session performs a SELECT command for each application identifier provided in com.apple.developer.nfc.readersession.iso7816.select-identifiers. The SELECT command searches for the identifiers in the order in which they appear in the array. The session calls the tagReaderSession(_:didDetect:) delegate method after the first successful SELECT command. The initialSelectedAID property of the found tag has the selected identifier.

Topics

Specifying Application Identifiers

property list key com.apple.developer.nfc.readersession.iso7816.select-identifiers

A list of application identifiers that the app supports.

Name: ISO7816 application identifiers for NFC Tag Reader Session

Getting Tag Information

var initialSelectedAID: String

A hexadecimal string of the application identifier for the tag selected by the reader session when discovering new tags.

Required.

var identifier: Data

The unique hardware identifier of the tag.

Required.

var historicalBytes: Data?

The historical bytes extracted from the Type A Answer To Select response.

Required.

var applicationData: Data?

The application data bytes extracted from the Type B Answer To Request response.

Required.

var proprietaryApplicationDataCoding: Bool

A Boolean value that indicates whether the application data follows proprietary data coding.

Required.

Sending a Command

func sendCommand(apdu: NFCISO7816APDU, completionHandler: (Data, UInt8, UInt8, Error?) -> Void)

Sends an application protocol data unit (APDU) to the tag and receives a response APDU.

Required.

class NFCISO7816APDU

An object representing an ISO 7816 application protocol data unit (APDU).

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 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
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