---
title: "performCardEmulationTransactionWithCurrentCredential(over:options:)"
framework: secureelementcredential
role: symbol
role_heading: Instance Method
path: "secureelementcredential/credentialsession/performcardemulationtransactionwithcurrentcredential(over:options:)"
---

# performCardEmulationTransactionWithCurrentCredential(over:options:)

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

## Declaration

```swift
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.

## Mentioned in

Accessing and using secure element credentials

## Discussion

Discussion This call leads to the following sequence of events. Prompts the user to authorize Card Emulation. Deselects the instance on the wired interface. Calls the broker interface with authorization information (if applicable). See the integration guide in the Apple Business Register for more information about this interface. 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: Call acquirePresentmentAssertion() before calling this function to ensure that UI from other applications’ payment tasks don’t interfere with this transaction. Relinquish the asssertion with relinquish() immediately prior to calling performCardEmulationTransactionWithCurrentCredential(over:options:). After presenting the credential, call endWiredMode() to return to management mode. If you have further proprietary payment UI to perform, use acquirePresentmentAssertion() to re-acquire the assertion. Perform your tasks, then call 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:) prior to calling this method. The state transitions to CredentialSession.State.management if the call encounters a CredentialSession.ErrorCode.resourceUnavailable error; otherwise the state remains unchanged. important: Calling this method may generate a billable event to the credential provider.

## See Also

### Performing card emulation

- [performTransaction(using:over:options:)](secureelementcredential/credentialsession/performtransaction(using:over:options:).md)
- [CredentialSession.CardEmulationOptions](secureelementcredential/credentialsession/cardemulationoptions.md)
- [endCardEmulation()](secureelementcredential/credentialsession/endcardemulation().md)
