pub unsafe trait NFCVASReaderSessionDelegate: NSObjectProtocol {
// Provided methods
unsafe fn readerSessionDidBecomeActive(&self, session: &NFCVASReaderSession)
where Self: Sized + Message { ... }
unsafe fn readerSession_didInvalidateWithError(
&self,
session: &NFCVASReaderSession,
error: &NSError,
)
where Self: Sized + Message { ... }
unsafe fn readerSession_didReceiveVASResponses(
&self,
session: &NFCVASReaderSession,
responses: &NSArray<NFCVASResponse>,
)
where Self: Sized + Message { ... }
}Expand description
Value Added Service (VAS) reader session callbacks.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn readerSessionDidBecomeActive(&self, session: &NFCVASReaderSession)
unsafe fn readerSessionDidBecomeActive(&self, session: &NFCVASReaderSession)
Parameter session: The session object in the active state.
Gets called when the NFC reader session has become active. RF is enabled and reader is scanning for VAS tags. The
readerSession:didReceiveVASResponses: @link/ will be called when a VAS transaction is completed.
Sourceunsafe fn readerSession_didInvalidateWithError(
&self,
session: &NFCVASReaderSession,
error: &NSError,
)
unsafe fn readerSession_didInvalidateWithError( &self, session: &NFCVASReaderSession, error: &NSError, )
Parameter session: The session object that is invalidated.
Parameter error: The error indicates the invalidation reason.
Gets called when a session becomes invalid. At this point the client is expected to discard the returned session object.
Sourceunsafe fn readerSession_didReceiveVASResponses(
&self,
session: &NFCVASReaderSession,
responses: &NSArray<NFCVASResponse>,
)
unsafe fn readerSession_didReceiveVASResponses( &self, session: &NFCVASReaderSession, responses: &NSArray<NFCVASResponse>, )
Parameter session: The session object used for tag detection.
Parameter responses: Array of
NFCVASResponse @link/ objects. The order of the response objects follows the
sequence of GET VAS DATA sent by the reader session.
@discussion Gets called when the reader completes the requested VAS transaction. Polling
is automatically restarted once the detected tag is removed from the reader's read range.