readNDEF(completionHandler:)
Retrieves an NDEF message from the tag.
Declaration
func readNDEF(completionHandler: @escaping @Sendable (NFCNDEFMessage?, (any Error)?) -> Void)func readNDEF() async throws -> NFCNDEFMessageParameters
- completionHandler:
The handler invoked by the reader session that provides the NDEF message. The handler has the following parameters:
- message
An Nfcndefmessage object, or
nilif an error occurs while retrieving the message.- error
An Nserror object if the read request fails; otherwise,
nil.
The session calls
completionHandleron the dispatch queue provided when creating the Nfcndefreadersession.