<!--
{
  "availability" : [
    "iOS: 18.1.0 -",
    "iPadOS: 18.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SecureElementCredential",
  "identifier" : "/documentation/SecureElementCredential/CredentialSession/performCardEmulationTransactionWithCurrentCredential(over:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SecureElementCredential",
      "UIKit"
    ],
    "preciseIdentifier" : "s:23SecureElementCredential0C7SessionC01_abC6_UIKitE042performCardEmulationTransactionWithCurrentC04over7optionsySo7UISceneC_AC0gH7OptionsVtYaKF"
  },
  "title" : "performCardEmulationTransactionWithCurrentCredential(over:options:)"
}
-->

# performCardEmulationTransactionWithCurrentCredential(over:options:)

Activate the current credential in Wired mode to enter Card Emulation mode.

```
func performCardEmulationTransactionWithCurrentCredential(over scene: UIScene, options: CredentialSession.CardEmulationOptions = .init()) async throws
```

## Parameters

`scene`

The <doc://com.apple.documentation/documentation/UIKit/UIScene> the authentication sheet appears over.

`options`

Options with which to transition the credential to card emulation mode.

## Discussion

This call leads to the following sequence of events.

1. Prompts the user to authorize Card Emulation.
2. Deselects the instance on the wired interface.
3. Calls the broker interface with authorization information (if applicable). See the integration guide in the [Apple Business Register](https://register.apple.com) for more information about this interface.
4. Makes the instance available over the contactless interface and transition the session to emulation state.

This process is guaranteed to preserve contents of the Clear On Reset buffer in the operating system running on the Secure Element. This allows you to create some context in wired mode that remains valid later in card emulation mode.

Use the following flow to call this method:

1. Call [`acquirePresentmentAssertion()`](/documentation/SecureElementCredential/CredentialSession/acquirePresentmentAssertion()) before calling this function to ensure that UI from other applications’ payment tasks don’t interfere with this transaction.
2. Relinquish the asssertion with [`relinquish()`](/documentation/SecureElementCredential/CredentialSession/PresentmentIntentAssertion/relinquish()) immediately prior to calling `performCardEmulationTransactionWithCurrentCredential(over:options:)`.
3. After presenting the credential, call [`endWiredMode()`](/documentation/SecureElementCredential/CredentialSession/endWiredMode()) to return to management mode.
4. If you have further proprietary payment UI to perform, use [`acquirePresentmentAssertion()`](/documentation/SecureElementCredential/CredentialSession/acquirePresentmentAssertion()) to re-acquire the assertion. Perform your tasks, then call [`relinquish()`](/documentation/SecureElementCredential/CredentialSession/PresentmentIntentAssertion/relinquish()) again. Re-acquiring the assertion is subject to the limit of two assertions in an 80-second span.

The credential session state must be [`CredentialSession.State.wired(credential:)`](/documentation/SecureElementCredential/CredentialSession/State-swift.enum/wired(credential:)) prior to calling this method. The state transitions to [`CredentialSession.State.management`](/documentation/SecureElementCredential/CredentialSession/State-swift.enum/management) if the call encounters a [`CredentialSession.ErrorCode.resourceUnavailable`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/resourceUnavailable) error; otherwise the state remains unchanged.

> Important: Calling this method may generate a billable event to the credential provider.

> Throws: An ``doc://SecureElementCredential/documentation/SecureElementCredential/CredentialSession/ErrorCode``. The most common errors are:
> 
> - ``doc://SecureElementCredential/documentation/SecureElementCredential/CredentialSession/ErrorCode/userCanceledAuthorization``: The user dismissed the authorization sheet.

---

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)