<!--
{
  "availability" : [
    "iOS: 18.1.0 -",
    "iPadOS: 18.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SecureElementCredential",
  "identifier" : "/documentation/SecureElementCredential/CredentialTransaction/performTransactionInWiredMode(using:instanceAID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SecureElementCredential",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:32_SecureElementCredential_SwiftUI0C11TransactionC07performF11InWiredMode5using11instanceAIDy0abC00C7SessionC0C0V_10Foundation4DataVtYaKF"
  },
  "title" : "performTransactionInWiredMode(using:instanceAID:)"
}
-->

# performTransactionInWiredMode(using:instanceAID:)

Enters wired mode to perform a transaction.

```
func performTransactionInWiredMode(using credential: Credential, instanceAID: Data) async throws
```

## Parameters

`credential`

The installed credential to enter wired mode with.

`instanceAID`

The instance applet instance identifier of the installed credential to authorize.

## Discussion

After you call this method, the system shows an authorization screen to the person using the app. If they choose to authorize, the specified instance receives an authentication token. The instance receives this token through the broker interface on the Secure Element as described in the [Apple Business Register](https://register.apple.com/login) Secure Element documents.

If the person using the app declines the authorization, the session throws [`CredentialSession.ErrorCode.accessDenied`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/accessDenied).

You can call this method in any session state. The state transitions to [`CredentialSession.State.wired(credential:)`](/documentation/SecureElementCredential/CredentialSession/State-swift.enum/wired(credential:)) if successful. If an error occurs, the state is unchanged, unless the error is [`CredentialSession.ErrorCode.resourceUnavailable`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/resourceUnavailable), which transitions the state back to [`CredentialSession.State.management`](/documentation/SecureElementCredential/CredentialSession/State-swift.enum/management).

The caller must invoke [`invalidate()`](/documentation/SecureElementCredential/CredentialTransaction/Configuration/invalidate()) after completing each transaction.

> Throws: An ``doc://SecureElementCredential/documentation/SecureElementCredential/CredentialSession/ErrorCode``. The most common errors are:
> 
> - ``doc://SecureElementCredential/documentation/SecureElementCredential/CredentialSession/ErrorCode/invalidView``: The transaction has no associated scene.
> - ``doc://SecureElementCredential/documentation/SecureElementCredential/CredentialSession/ErrorCode/credentialDoesNotExist``: The specified credential doesn’t exist or the caller doesn’t have access to it.
> - ``doc://SecureElementCredential/documentation/SecureElementCredential/CredentialSession/ErrorCode/instanceDoesNotExist``: The specified instance identifier doesn’t exist in the target credential.
> - ``doc://SecureElementCredential/documentation/SecureElementCredential/CredentialSession/ErrorCode/userCanceledAuthorization``: The user dismissed the authorization sheet.
> - ``doc://SecureElementCredential/documentation/SecureElementCredential/CredentialSession/ErrorCode/resourceUnavailable``: The system resource is unavailable.

---

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)