Contents

readNDEF(completionHandler:)

Retrieves an NDEF message from the tag.

Declaration

func readNDEF(completionHandler: @escaping  @Sendable (NFCNDEFMessage?, (any Error)?) -> Void)
func readNDEF() async throws -> NFCNDEFMessage

Parameters

  • completionHandler:

    The handler invoked by the reader session that provides the NDEF message. The handler has the following parameters:

    message

    An Nfcndefmessage object, or nil if an error occurs while retrieving the message.

    error

    An Nserror object if the read request fails; otherwise, nil.

    The session calls completionHandler on the dispatch queue provided when creating the Nfcndefreadersession.