Skip to content

NFCReaderSession

treastrain edited this page May 7, 2021 · 2 revisions

NFCReaderSession

The abstract base class that represents a reader session for detecting NFC tags.

open class NFCReaderSession: NFCReaderSessionProtocol 

Inheritance

NFCReaderSessionProtocol

Properties

readingAvailable

A Boolean value that determines whether the device supports NFC tag reading.

open class var readingAvailable: Bool 

Before creating a reader session, always check the readingAvailable property to determine whether the user’s device supports scanning for and detecting NFC tags.

delegate

The delegate of the reader session.

weak open var delegate: AnyObject?

sessionQueue

The queue on which the reader session delegate callbacks and completion block handlers are dispatched.

open var sessionQueue: DispatchQueue = .main

isReady

A Boolean value that indicates whether the reader session is started and ready to use.

public var isReady = false

alertMessage

A custom description that helps users understand how they can use NFC reader mode in your app.

public var alertMessage: String = ""

Methods

begin()

Starts the reader session.

public func begin() 

invalidate(errorMessage:)

Closes the reader session and displays an error message to the user.

public func invalidate(errorMessage: String?) 
Clone this wiki locally