pub unsafe trait NFCReaderSessionDelegate: NSObjectProtocol {
// Provided methods
unsafe fn readerSessionDidBecomeActive(&self, session: &NFCReaderSession)
where Self: Sized + Message { ... }
unsafe fn readerSession_didInvalidateWithError(
&self,
session: &NFCReaderSession,
error: &NSError,
)
where Self: Sized + Message { ... }
unsafe fn readerSession_didDetectTags(
&self,
session: &NFCReaderSession,
tags: &NSArray<ProtocolObject<dyn NFCTag>>,
)
where Self: Sized + Message { ... }
}Expand description
General reader session callbacks
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn readerSessionDidBecomeActive(&self, session: &NFCReaderSession)
unsafe fn readerSessionDidBecomeActive(&self, session: &NFCReaderSession)
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 tags. The
readerSession:didDetectTags: @link/ will be called when a tag is detected.
Sourceunsafe fn readerSession_didInvalidateWithError(
&self,
session: &NFCReaderSession,
error: &NSError,
)
unsafe fn readerSession_didInvalidateWithError( &self, session: &NFCReaderSession, 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_didDetectTags(
&self,
session: &NFCReaderSession,
tags: &NSArray<ProtocolObject<dyn NFCTag>>,
)
unsafe fn readerSession_didDetectTags( &self, session: &NFCReaderSession, tags: &NSArray<ProtocolObject<dyn NFCTag>>, )
Parameter session: The session object used for tag detection.
Parameter tags: Array of
NFCTag @link/ objects.
@discussion Gets called when the reader detects NFC tag(s) in the polling sequence.