Repository navigation
feat: pass optional primaryAccountIdentifier to Apple Wallet - #91
Brunonascdev wants to merge 1 commit into
Conversation
PassKit uses this id to recognize a reissued card after the PAN suffix changes.
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
JakubKorytko
left a comment
There was a problem hiding this comment.
note: #56 also asks for the selected device in the issuer callback, so this covers only the first part of it and the issue should stay open after merge, unless you want to expand this PR
| lastDigits: string; | ||
| cardDescription: string; | ||
| /** Opaque issuer id. PassKit uses it to recognize a reissued card. */ | ||
| primaryAccountIdentifier?: string; |
There was a problem hiding this comment.
Could you also add primaryAccountIdentifier?: string to the IOSCardData row in the README data types table? People read that table to see which fields they can pass.
| configuration.primaryAccountSuffix = card.lastDigits | ||
| configuration.localizedDescription = String(card.cardDescription) | ||
| if let primaryAccountIdentifier = card.primaryAccountIdentifier { | ||
| configuration.primaryAccountIdentifier = primaryAccountIdentifier |
There was a problem hiding this comment.
Not sure about this one: what happens when the pass with this id is already on every device (iPhone and Watch)? If PassKit has nowhere to add it, PKAddPaymentPassViewController(...) might return nil and the user gets "InApp enrollment controller configuration fails", which is confusing. Did you get a chance to check that case? If it is a real problem, PKPassLibrary().canAddSecureElementPass(primaryAccountIdentifier:) could be used to give a clearer error.
|
Heads up: #93 just landed and adds an old arch branch to the |
Details
IOSCardDatacannot setPKAddPaymentPassRequestConfiguration.primaryAccountIdentifier. Issuers that reissue a card keep one opaque id while the PAN suffix changes, and PassKit uses that id to recognize the existing pass.This adds an optional
primaryAccountIdentifier. The native bridge forwards it only when it is non-empty, andWalletManagersets it on the PassKit configuration only when it is present. Callers that omit it keep the current behavior.Related Issues
#56
Manual Tests
No automated coverage for the PassKit configuration. The field is omitted from the native dictionary when absent, and assigned on the configuration when present. Confirming PassKit recognizes a reissued card still needs a device and an issuer that supplies the id.