> 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/ja/implement-nfc-wallet/make-payments/implement-contactless-payment/2.-manage-the-default-payment-application.md).

# 2. デフォルトの支払いアプリケーションを管理する

既定の支払いアプリケーションは、エンドユーザーが [ダブルクリック](/nfc-wallet-sdk-ios/ja/implement-nfc-wallet/make-payments/implement-contactless-payment.md#double-click) または [フィールド検出](/nfc-wallet-sdk-ios/ja/implement-nfc-wallet/make-payments/implement-contactless-payment.md#field-detect) アクションを実行したときに起動します。

ダブルクリックによる支払い体験は、エンドユーザーによって有効化または無効化できます。

<figure><img src="/files/899ee41877913d62c658eb6d4fa723b39e885015" alt="" width="563"><figcaption><p>既定の支払いアプリケーションに関するエンドユーザー設定</p></figcaption></figure>

エンドユーザーがダブルクリックまたはフィールド検出アクションを実行したときに、以下のNFC起動イベントをアプリケーションが受け取る場合、あなたの支払いアプリケーションが既定の支払いアプリケーションに設定されていることを示します。

{% code expandable="true" %}

```swift
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
        
    // ダブルクリックまたはフィールド検出アクションで非接触決済を開始するためのサポート 
    // アプリケーションが起動しておらず、アプリケーションが既定の支払いアプリケーションである場合
    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:
                    // ダブルクリックのユースケース
                    break
                case .readerDetected:
                    // フィールド検出のユースケース
                    break
                @unknown default: break
                }
            }
        }
    }

}


extension SceneDelegate: NFCWindowSceneDelegate {
    @available(iOS 17.4, *)
    // アプリケーションがバックグラウンドまたはフォアグラウンドにあり、既定の支払いアプリケーションである場合に、ダブルクリックまたはフィールド検出アクションで非接触決済を開始するためのサポート
    func windowScene(_ windowScene: UIWindowScene, didReceiveNFCWindowSceneEvent event: NFCWindowSceneEvent) {
        switch event {
        case .presentation:
            // ダブルクリックのユースケース
            break
        case .readerDetected:
            // フィールド検出のユースケース
            break
        @unknown default: break
        }
    }
}
```

{% endcode %}

{% hint style="info" %}
アプリケーションが既定の支払いアプリケーションに設定されていない場合でも、非接触決済を行うことは可能です。ただし、ダブルクリックやフィールド検出のアクションにより既定のアプリケーションが前面に表示される場合があります。
{% 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
