Package apple.corenfc.protocol
Interface NFCMiFareTag
-
- All Superinterfaces:
NFCNDEFTag,NFCTag,NSCoding,NSCopying,NSSecureCoding
public interface NFCMiFareTag extends NFCTag, NFCNDEFTag
[@protocol] NFCMiFareTag A @link NFCTagReaderSession @link/ reader session returns an instance conforming to this protocol when a MiFare tag is detected. Unless it is specified all block completion handlers are dispatched on the session work queue that is associated with the tag. Your process requires to include the "com.apple.developer.nfc.readersession.formats" entitlement to receive this tag object from the @link NFCTagReaderSessionDelegate @link/ delegate. Tag must be in the connected state for NFCNDEFTag protocol properties and methods to work correctly. [@link] NFCReaderErrorSecurityViolation @link/ will be returned from the @link NFCTagReaderSessionDelegate @link/ invalidation method if the required entitlement is missing when session is started.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceNFCMiFareTag.Block_sendMiFareCommandCompletionHandlerstatic interfaceNFCMiFareTag.Block_sendMiFareISO7816CommandCompletionHandler-
Nested classes/interfaces inherited from interface apple.corenfc.protocol.NFCNDEFTag
NFCNDEFTag.Block_queryNDEFStatusWithCompletionHandler, NFCNDEFTag.Block_readNDEFWithCompletionHandler, NFCNDEFTag.Block_writeLockWithCompletionHandler, NFCNDEFTag.Block_writeNDEFCompletionHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NSDatahistoricalBytes()The optional historical bytes extracted from the Answer To Select response.NSDataidentifier()The hardware UID of the tag.longmifareFamily()[@property] mifareFamily MiFare product type identifier.voidsendMiFareCommandCompletionHandler(NSData command, NFCMiFareTag.Block_sendMiFareCommandCompletionHandler completionHandler)sendMiFareCommand:completionHandler: Send native MIFARE command to a tag.voidsendMiFareISO7816CommandCompletionHandler(NFCISO7816APDU apdu, NFCMiFareTag.Block_sendMiFareISO7816CommandCompletionHandler completionHandler)sendMiFareISO7816Command:completionHandler: Send a ISO7816 command APDU to the tag and receives a response APDU.-
Methods inherited from interface apple.corenfc.protocol.NFCNDEFTag
isAvailable, queryNDEFStatusWithCompletionHandler, readNDEFWithCompletionHandler, writeLockWithCompletionHandler, writeNDEFCompletionHandler
-
Methods inherited from interface apple.corenfc.protocol.NFCTag
asNFCFeliCaTag, asNFCISO15693Tag, asNFCISO7816Tag, asNFCMiFareTag, isAvailable, session, type
-
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
-
historicalBytes
NSData historicalBytes()
The optional historical bytes extracted from the Answer To Select response.
-
identifier
NSData identifier()
The hardware UID of the tag.
-
mifareFamily
long mifareFamily()
[@property] mifareFamily MiFare product type identifier.
-
sendMiFareCommandCompletionHandler
void sendMiFareCommandCompletionHandler(NSData command, NFCMiFareTag.Block_sendMiFareCommandCompletionHandler completionHandler)
sendMiFareCommand:completionHandler: Send native MIFARE command to a tag. Support MIFARE UltraLight, Plus, and DESFire products. Crypto1 protocol is not supported. Command chainning is handled internally by the method and the full response composed of the individual fragment is returned in the completion handler.- Parameters:
command- The complete MiFare command. CRC bytes are calculated and inserted automatically to the provided packet data frame.completionHandler- Completion handler called when the operation is completed. error is nil if operation succeeds. A @link NFCErrorDomain @link/ error is returned when there is a communication issue with the tag. Successfully read data blocks will be returned from the NSData object.
-
sendMiFareISO7816CommandCompletionHandler
void sendMiFareISO7816CommandCompletionHandler(NFCISO7816APDU apdu, NFCMiFareTag.Block_sendMiFareISO7816CommandCompletionHandler completionHandler)
sendMiFareISO7816Command:completionHandler: Send a ISO7816 command APDU to the tag and receives a response APDU. Only available when @link mifareFamily @link/ returns NFCMiFarePlus, NFCMiFareDESFire.- Parameters:
apdu- The ISO7816-4 command APDU object.completionHandler- Completion handler called when the operation is completed. error is nil if operation succeeds. A @link NFCErrorDomain @link/ error is returned when there is a communication issue with the tag or tag does not support ISO7816-4 commands, and all other parameters should be ignore.
-
-