One Logo Pool Ball
CoreNFC · IOS API REFERENCE

NFCMiFareTag

protocol · iOS 13.0+ · SDK 27.1

protocol NFCMiFareTag : NFCNDEFTag, __NFCTag

Members (3)

method · iOS 14.0+

sendMiFareISO7816Command

Swift declaration
@preconcurrency func sendMiFareISO7816Command(_ apdu: NFCISO7816APDU, resultHandler: @escaping @Sendable (Result<NFCISO7816ResponseAPDU, any Error>) -> Void)

Send a ISO7816 command APDU to the tag and receives a response APDU. Only available when `mifareFamily` returns `NFCMiFarePlus`, `NFCMiFareDESFire`. - Parameters: - apdu: The ISO7816-4 command APDU object. - resultHandler: Returns a `NFCISO7816ResponseAPDU` or an Error when the operation is completed. A `NFCErrorDomain` error is returned when there is a communication issue with the tag or tag does not support ISO7816-4 commands.

method · iOS 14.0+

sendMiFareISO7816Command

Swift declaration
func sendMiFareISO7816Command(_ apdu: NFCISO7816APDU) async throws -> NFCISO7816ResponseAPDU

Send a ISO7816 command APDU to the tag and receives a response APDU. Only available when `mifareFamily` returns `NFCMiFarePlus`, `NFCMiFareDESFire`. - Parameters: - apdu: The ISO7816-4 command APDU object. - Returns: Returns a `NFCISO7816ResponseAPDU` object. A `NFCErrorDomain` error is returned when there is a communication issue with the tag or tag does not support ISO7816-4 commands.

method · iOS 14.0+

sendMiFareCommand

Swift declaration
@preconcurrency func sendMiFareCommand(commandPacket command: Data, resultHandler: @escaping @Sendable (Result<Data, any Error>) -> Void)

Send native MIFARE command to a tag. Support MIFARE UltraLight, Plus, and DESFire products. Crypto1 protocol is not supported. Command chaining 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. - resultHandler: Completion handler called when the operation is completed. A `NFCErrorDomain` error is returned when there is a communication issue with the tag. Successfully read data blocks will be returned from the Data object.

Skipped declarations

No declarations were skipped in this snapshot.

All CoreNFC types →