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. API-Since: 13.0
-
-
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(@NotNull NFCNDEFTag.Block_queryNDEFStatusWithCompletionHandler completionHandler)queryNDEFStatusWithCompletionHandler: Query the NDEF support status of the tag.voidreadNDEFWithCompletionHandler(@NotNull NFCNDEFTag.Block_readNDEFWithCompletionHandler completionHandler)readNDEFWithCompletionHandler: Reads NDEF message from the tag.voidwriteLockWithCompletionHandler(@NotNull NFCNDEFTag.Block_writeLockWithCompletionHandler completionHandler)writeLockWithCompletionHandler: Locks the NDEF tag to read-only state; tag can no longer be written afterward.voidwriteNDEFCompletionHandler(@NotNull NFCNDEFMessage ndefMessage, @NotNull 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. API-Since: 13.0- 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(@NotNull @NotNull NFCNDEFTag.Block_queryNDEFStatusWithCompletionHandler completionHandler)queryNDEFStatusWithCompletionHandler: Query the NDEF support status of the tag. API-Since: 13.0- 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(@NotNull @NotNull NFCNDEFTag.Block_readNDEFWithCompletionHandler completionHandler)readNDEFWithCompletionHandler: Reads NDEF message from the tag. API-Since: 13.0- 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(@NotNull @NotNull 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/. API-Since: 13.0- Parameters:
completionHandler- Returns operation status. A nil NSError object indicates a successful lock operation.
-
writeNDEFCompletionHandler
void writeNDEFCompletionHandler(@NotNull @NotNull NFCNDEFMessage ndefMessage, @NotNull @NotNull NFCNDEFTag.Block_writeNDEFCompletionHandler completionHandler)writeNDEF:completionHandler: Writes a NDEF message to the tag. API-Since: 13.0- Parameters:
completionHandler- Returns operation status. A nil NSError object indicates a successful write operation.
-
-