Khagesh Patel
Khagesh Patel

Reputation: 82

PKPassLibrary not returning passes

I have added Debit Card programmatically to Apple Wallet using swift code. I need to show card status as provisioned so that user can should not try to add this card again.

for that I am using below code to get passes from wallet

        let passLibrary = PKPassLibrary()
        let devicePaymentPasses = passLibrary.passes().compactMap { $0.paymentPass }
        let remotePaymentPasses = passLibrary.remotePaymentPasses()

both devicePaymentPasses and remotePaymentPasses are empty. please help.

Upvotes: 3

Views: 2784

Answers (1)

pipacs
pipacs

Reputation: 1109

You need to add the Wallet entitlement to the app, in order to read passes created with the app's team ID.

Upvotes: 3

Related Questions