<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoTokenKit",
  "identifier" : "/documentation/CryptoTokenKit/TKSmartCard/userInteractionForSecurePINVerification(_:apdu:pinByteOffset:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CryptoTokenKit"
    ],
    "preciseIdentifier" : "c:objc(cs)TKSmartCard(im)userInteractionForSecurePINVerificationWithPINFormat:APDU:PINByteOffset:"
  },
  "title" : "userInteractionForSecurePINVerification(_:apdu:pinByteOffset:)"
}
-->

# userInteractionForSecurePINVerification(_:apdu:pinByteOffset:)

Creates and returns a new user interaction object for secure PIN verification using the Smart Card reader facilities.

```
func userInteractionForSecurePINVerification(_ PINFormat: TKSmartCardPINFormat, apdu APDU: Data, pinByteOffset PINByteOffset: Int) -> TKSmartCardUserInteractionForSecurePINVerification?
```

## Parameters

`PINFormat`

The PIN format descriptor.

`APDU`

The Application Protocol Data Unit (APDU) used by the Smart Card to fill in PIN data.

`PINByteOffset`

The offset, in bytes, within the Application Protocol Data Unit (APDU) field to mark a location of a PIN block for filling in the entered PIN.
  
  > Important:
  > This parameter is not currently used. Pass `0`.

## Return Value

A new user interaction object for secure PIN verification, or `nil` if this feature is not supported by the Smart Card reader.

## Discussion

You should only call this method after a session to the Smart Card has been established using the [`beginSession(reply:)`](/documentation/CryptoTokenKit/TKSmartCard/beginSession(reply:)) method, and before the session is terminated using the [`endSession()`](/documentation/CryptoTokenKit/TKSmartCard/endSession()) method.

Once the interaction has been successfully completed, the results are available via the [`resultData`](/documentation/CryptoTokenKit/TKSmartCardUserInteractionForPINOperation/resultData) and [`resultSW`](/documentation/CryptoTokenKit/TKSmartCardUserInteractionForPINOperation/resultSW) properties of the returned [`TKSmartCardUserInteractionForSecurePINVerification`](/documentation/CryptoTokenKit/TKSmartCardUserInteractionForSecurePINVerification) object.

---

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)