Skip to content

[iOS] Add support for primaryAccountIdentifier in IOSCardData to enable device filtering #56

Description

@iamdreo

Description

Two related issues when provisioning cards to multiple devices (iPhone + Apple Watch):

Issue 1: Device picker shows all devices after first provisioning

After adding a card to iPhone, clicking "Add to Wallet" again shows both iPhone and Watch in the picker, instead of just Watch.

Issue 2: No way to know which device was selected

The issuerEncryptPayloadCallback is called with nonce, nonceSignature, and certificates, but doesn't indicate which device (iPhone or Watch) the user selected. This is needed to pass the correct device_type to the issuer's backend.

Root Cause

Issue 1

primaryAccountIdentifier is not exposed in IOSCardData or set on PKAddPaymentPassRequestConfiguration.

Issue 2

The callback signature doesn't include device information:
issuerEncryptPayloadCallback: (
nonce: string,
nonceSignature: string,
certificate: string[]
) => Promise
// Missing: deviceType parameter

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions