> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet-sdk-ios/implement-nfc-wallet/make-payments/implement-contactless-payment/2.-manage-the-default-payment-application.md).

# 2. Manage the default payment application

The default payment application is launched when the end user performs a [double-click](/nfc-wallet-sdk-ios/implement-nfc-wallet/make-payments/implement-contactless-payment.md#double-click) or [field-detect](/nfc-wallet-sdk-ios/implement-nfc-wallet/make-payments/implement-contactless-payment.md#field-detect) action.

The double-click payment experience can be enabled or disabled by the end user.

<figure><img src="https://3694475028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bUtiXdSFHu8lmOj8A0X%2Fuploads%2FIptYwGEowpiVZwV2cbF0%2F2.%20Manage%20the%20default%20payment%20application.png?alt=media&amp;token=a4d4bbe3-06cd-4a8d-91f9-b80a084af8a4" alt="" width="563"><figcaption><p>End-user settings for the default payment application</p></figcaption></figure>

If your application receives the NFC launch events below when the end user performs a double-click or field-detect action, it indicates that your payment application is set as the default payment application.

{% code expandable="true" %}

```swift
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
        
    // to support initiate contactless payments by double-click or field-detect action 
    // when application is not running + application is the default payment application
    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
        
        if #available(iOS 17.4, *) {
            if let nfcEvent = connectionOptions.nfcEvent {
                switch nfcEvent {
                case .presentation:
                    // use case for double-click
                    break
                case .readerDetected:
                    // use case for field-detect
                    break
                @unknown default: break
                }
            }
        }
    }

}


extension SceneDelegate: NFCWindowSceneDelegate {
    @available(iOS 17.4, *)
    // to support initiate contactless payments by double-click or field-detect action when application is background or foreground and is the default payment application
    func windowScene(_ windowScene: UIWindowScene, didReceiveNFCWindowSceneEvent event: NFCWindowSceneEvent) {
        switch event {
        case .presentation:
            // use case for double-click
            break
        case .readerDetected:
            // use case for field-detect
            break
        @unknown default: break
        }
    }
}
```

{% endcode %}

{% hint style="info" %}
You can still perform a contactless payment when the application is not set as the default payment application. However, a double-click or field-detect action may bring the default application to the foreground.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-ios/implement-nfc-wallet/make-payments/implement-contactless-payment/2.-manage-the-default-payment-application.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
