Package apple.corenfc.protocol
Interface NFCNDEFTag
-
- All Superinterfaces:
NSCoding,NSCopying,NSSecureCoding
- All Known Subinterfaces:
NFCFeliCaTag,NFCISO15693Tag,NFCISO7816Tag,NFCMiFareTag
public interface NFCNDEFTag extends NSSecureCoding, NSCopying
[@protocol] NFCNDEFTag Operations on a NDEF formatted tag. Unless it is specified all block completion handlers are dispatched on the session work queue that is associated with the tag.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceNFCNDEFTag.Block_queryNDEFStatusWithCompletionHandlerstatic interfaceNFCNDEFTag.Block_readNDEFWithCompletionHandlerstatic interfaceNFCNDEFTag.Block_writeLockWithCompletionHandlerstatic interfaceNFCNDEFTag.Block_writeNDEFCompletionHandler
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisAvailable()[@property] available: Check whether a detected NDEF tag is available.voidqueryNDEFStatusWithCompletionHandler(NFCNDEFTag.Block_queryNDEFStatusWithCompletionHandler completionHandler)queryNDEFStatusWithCompletionHandler: Query the NDEF support status of the tag.voidreadNDEFWithCompletionHandler(NFCNDEFTag.Block_readNDEFWithCompletionHandler completionHandler)readNDEFWithCompletionHandler: Reads NDEF message from the tag.voidwriteLockWithCompletionHandler(NFCNDEFTag.Block_writeLockWithCompletionHandler completionHandler)writeLockWithCompletionHandler: Locks the NDEF tag to read-only state; tag can no longer be written afterward.voidwriteNDEFCompletionHandler(NFCNDEFMessage ndefMessage, NFCNDEFTag.Block_writeNDEFCompletionHandler completionHandler)writeNDEF:completionHandler: Writes a NDEF message to the tag.-
Methods inherited from interface apple.foundation.protocol.NSCoding
encodeWithCoder, initWithCoder
-
Methods inherited from interface apple.foundation.protocol.NSCopying
copyWithZone
-
Methods inherited from interface apple.foundation.protocol.NSSecureCoding
_supportsSecureCoding
-
-
-
-
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.
-
-