<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreNFC",
  "identifier" : "/documentation/CoreNFC/NFCMiFareTag/sendMiFareISO7816Command(_:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core NFC"
    ],
    "preciseIdentifier" : "c:objc(pl)NFCMiFareTag(im)sendMiFareISO7816Command:completionHandler:"
  },
  "title" : "sendMiFareISO7816Command(_:completionHandler:)"
}
-->

# sendMiFareISO7816Command(_:completionHandler:)

Sends an ISO 7816 command APDU to the tag and receives a response APDU.

```
func sendMiFareISO7816Command(_ apdu: NFCISO7816APDU, completionHandler: @escaping @Sendable (Data, UInt8, UInt8, (any Error)?) -> Void)
```

```
func sendMiFareISO7816Command(_ apdu: NFCISO7816APDU) async throws -> (Data, UInt8, UInt8)
```

## Parameters

`apdu`

An ISO 7816-4 command APDU object.

`completionHandler`

A handler that the reader session invokes after the operation completes. The session calls `completionHandler` on the dispatch queue that you provided when creating the [`NFCTagReaderSession`](/documentation/CoreNFC/NFCTagReaderSession) object.

    The handler has the following parameters:

- responseData: An <doc://com.apple.documentation/documentation/Foundation/NSData> object containing the APDU response.
- sw1: The SW1 command-processing status byte.
- sw2: The SW2 command-processing status byte.
- error: `nil` when the operation is successful; otherwise, an <doc://com.apple.documentation/documentation/Foundation/NSError> object indicating that a problem occurred while communicating with the tag, or that the tag doesn’t support ISO 7816-4 commands.

## Discussion

Use this method to send commands to tags that have a [`mifareFamily`](/documentation/CoreNFC/NFCMiFareTag/mifareFamily) value of either [`NFCMiFareFamily.plus`](/documentation/CoreNFC/NFCMiFareFamily/plus) or [`NFCMiFareFamily.desfire`](/documentation/CoreNFC/NFCMiFareFamily/desfire).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)