public interface NFCNDEFTag extends NSSecureCoding, NSCopying
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.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
NFCNDEFTag.Block_queryNDEFStatusWithCompletionHandler |
static interface |
NFCNDEFTag.Block_readNDEFWithCompletionHandler |
static interface |
NFCNDEFTag.Block_writeLockWithCompletionHandler |
static interface |
NFCNDEFTag.Block_writeNDEFCompletionHandler |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAvailable()
[@property] available:
|
void |
queryNDEFStatusWithCompletionHandler(NFCNDEFTag.Block_queryNDEFStatusWithCompletionHandler completionHandler)
queryNDEFStatusWithCompletionHandler:
|
void |
readNDEFWithCompletionHandler(NFCNDEFTag.Block_readNDEFWithCompletionHandler completionHandler)
readNDEFWithCompletionHandler:
|
void |
writeLockWithCompletionHandler(NFCNDEFTag.Block_writeLockWithCompletionHandler completionHandler)
writeLockWithCompletionHandler:
|
void |
writeNDEFCompletionHandler(NFCNDEFMessage ndefMessage,
NFCNDEFTag.Block_writeNDEFCompletionHandler completionHandler)
writeNDEF:completionHandler:
|
_supportsSecureCodingencodeWithCoder, initWithCodercopyWithZoneboolean isAvailable()
Check whether a detected NDEF tag is available.
void queryNDEFStatusWithCompletionHandler(NFCNDEFTag.Block_queryNDEFStatusWithCompletionHandler completionHandler)
Query the NDEF support status of the tag.
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.void readNDEFWithCompletionHandler(NFCNDEFTag.Block_readNDEFWithCompletionHandler completionHandler)
Reads NDEF message from the tag.
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.void writeLockWithCompletionHandler(NFCNDEFTag.Block_writeLockWithCompletionHandler completionHandler)
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/.
completionHandler - Returns operation status. A nil NSError object indicates a successful lock operation.void writeNDEFCompletionHandler(NFCNDEFMessage ndefMessage, NFCNDEFTag.Block_writeNDEFCompletionHandler completionHandler)
Writes a NDEF message to the tag.
completionHandler - Returns operation status. A nil NSError object indicates a successful write operation.