> 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/additional-features/handle-visa-multiple-aids.md).

# Visaの複数AIDを処理する

## 概要

Visaの複数AIDを扱うにはNFC Wallet SDKを使用します。

利用可能なAIDを読み取れます。AIDの優先度とロック状態も更新できます。

## SDK 統合

アプリケーション識別子（AID）は次を通じて公開されます `DigitalCard.aidInfoList: [AIDInfo]`.

複数AIDを検出するには、次を確認してください `DigitalCard.isMultiAID: Bool`.

### AID情報を取得する

`DigitalCard.aidInfoList: [AIDInfo]` 配列を返します `AIDInfo` オブジェクト。

各 `AIDInfo` にはAIDとメタデータが含まれます：

* `AIDInfo.aid`: AIDを `文字列`.
* `AIDInfo.label`: ラベルを `文字列`.
* `AIDInfo.lockStatus`: AIDの状態： `.locked` または `.unlocked` （デフォルト）。

{% hint style="warning" %}
サポートされるのはVisaカードのみです。

非Visaカードで呼び出された場合：

* `DigitalCard.isMultiAID` は常に返します `false`.
* `DigitalCard.aidInfoList` および `DigitalCard.setAIDInfoList(_:）` をスローします `clientError`.
  {% endhint %}

{% hint style="info" %}
端末はステータスワードを返します `6A81` を送信するときに **SELECT** ロックされたAIDに対して。
{% endhint %}

### AIDの優先度とロック状態を更新する

次を使用してください `AIDInfo` オブジェクトを `aidInfoList` から更新されたリストを構築するときに。

`AIDInfo.lockStatus` は変更可能です。AIDの優先度を変更するためにリストの並べ替えもできます。

リストの最初の要素が最も高い優先度を持ちます。

AID構成を更新するには：

1. 次を使用してください `DigitalCard.aidInfoList: [AIDInfo]` デジタルカードから `AIDInfo` を取得するAPI。
2. 新しい配列を作成し、順序および/またはを更新します `lockStatus`.
3. を使用して更新を適用します `DigitalCard.setAIDInfoList(_:）`.

{% hint style="warning" %}
新しいリストを設定する場合、同じ `AIDInfo` 要素を維持してください。

AIDやラベルを追加、削除、変更しないでください。さもなければ、 `DigitalCard.Error.aidInfoListMismatch` がスローされます。
{% endhint %}

### 例

この例ではAIDの順序を変更し、1つのAIDをロックします。

```swift
var aidInfoList = try await digitalCard.aidInfoList
let isMultiAID = try await digitalCard.isMultiAID
  
var newAIDInfoList: [AIDInfo] = []

// 必要に応じて項目の順序を入れ替えます：
newAIDInfoList.append(aidInfoList[3])
newAIDInfoList.append(aidInfoList[0])
newAIDInfoList.append(aidInfoList[1])
newAIDInfoList.append(aidInfoList[2])

// 項目の並べ替えが不要な場合、
// 元の配列から新しいコピーを作成できます：
newAIDInfoList = aidInfoList

// 必要に応じてAIDのlockStatusを変更します：
newAIDInfoList[0].lockStatus = .locked
newAIDInfoList[1].lockStatus = .unlocked

// `AIDInfo`オブジェクトの新しい配列をdigitalCardに設定します：
try await digitalCard.setAIDInfoList(newAIDInfoList)
```

{% hint style="info" %}
`digitalCard.aidInfoList` のコピーを返します `AIDInfo`.

配列を変更してもデジタルカードは更新されません。呼び出してください `setAIDInfoList(_:）` 変更を有効にするため。
{% 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/additional-features/handle-visa-multiple-aids.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.
