Interface NFCNDEFTag

    • Method Detail

      • isAvailable

        boolean isAvailable()
        [@property] available: Check whether a detected NDEF tag is available.
        Returns:
        YES if NDEF tag is available in the current reader session. A tag remove from the RF field will become unavailable. Tag in disconnected state will return NO.
      • queryNDEFStatusWithCompletionHandler

        void queryNDEFStatusWithCompletionHandler​(NFCNDEFTag.Block_queryNDEFStatusWithCompletionHandler completionHandler)
        queryNDEFStatusWithCompletionHandler: Query the NDEF support status of the tag.
        Parameters:
        completionHandler - Return the NFCNDEFStatus of the tag. capacity indicates the maximum NDEF message size in bytes that can be store on the tag. error returns a valid NSError object when query fails.
      • readNDEFWithCompletionHandler

        void readNDEFWithCompletionHandler​(NFCNDEFTag.Block_readNDEFWithCompletionHandler completionHandler)
        readNDEFWithCompletionHandler: Reads NDEF message from the tag.
        Parameters:
        completionHandler - Returns the NDEF message from read operation. Successful read would return a valid NFCNDEFMessage object with NSError object set to nil; read failure returns a nil NFCNDEFMessage and a valid NSError object.
      • writeLockWithCompletionHandler

        void writeLockWithCompletionHandler​(NFCNDEFTag.Block_writeLockWithCompletionHandler completionHandler)
        writeLockWithCompletionHandler: Locks the NDEF tag to read-only state; tag can no longer be written afterward. This is a permanent operation. A successful lock operaiton via this method will change the NFCNDEFStatus value of the tag to @link NFCNDEFStatusReadOnly @link/.
        Parameters:
        completionHandler - Returns operation status. A nil NSError object indicates a successful lock operation.
      • writeNDEFCompletionHandler

        void writeNDEFCompletionHandler​(NFCNDEFMessage ndefMessage,
                                        NFCNDEFTag.Block_writeNDEFCompletionHandler completionHandler)
        writeNDEF:completionHandler: Writes a NDEF message to the tag.
        Parameters:
        completionHandler - Returns operation status. A nil NSError object indicates a successful write operation.