Contents

NFCPaymentTagReaderSession

A reader session that supports the use of payment tags.

Declaration

class NFCPaymentTagReaderSession

Overview

This subclass of NFCTagReaderSession adds support for payment tags, when someone uses your app in certain regions. To support payment tags in your app, intialize this class with a NFCTagReaderSessionDelegate. The delegate 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 an ISO 7816-compatible tag, the session performs a SELECT command for each application identifier provided in ISO7816 application identifiers for NFC Tag Reader Session. The SELECT command searches for the identifiers in the order in which they appear in the array. The session calls the tagReaderSession:didDetectTags: delegate method after the first successful SELECT command. The initialSelectedAID property of the found tag contains the selected identifier.

The tag must be available to the reader session, so it can read and write data to the tag. Use the isAvailable property to check the tag’s availability. To connect to an available tag, call the superclass’s connect(to:completionHandler:) method.

The system only supports one active NFCReaderSession at a time. The system queues and processes subsequently opened sessions in first-in-first-out order.

Topics

Creating a tag reader session

See Also

Reader sessions