> 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 を処理する

## 概要

NFC Wallet SDK を使用して Visa の複数 AID を処理します。

利用可能な 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]` を取得する API `AIDInfo` デジタルカードから。
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, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-ios/ja/additional-features/handle-visa-multiple-aids.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
