availablePassEntries
Call the availablePassEntries API to report the list of device tokens available to add to the current device.
Method signature
@available(iOS 14.0, *)
public static func availablePassEntries(completion: @escaping (Result<[PKIssuerProvisioningExtensionPaymentPassEntry], IAPAPErrors>) -> Void)Request parameters
Parameter | Type | Required | Description |
completion | (Result<[PKIssuerProvisioningExtensionPaymentPassEntry], IAPAPErrors>) -> Void | Yes | An asynchronous completion callback that returns the result of calling the availablePassEntries API. |
PKIssuerProvisioningExtensionPaymentPassEntry
Parameter | Type | Required | Description |
addRequestConfiguration | Yes | The configuration used by the system to add a device token. |
PKAddPaymentPassRequestConfiguration
Parameter | Type | Required | Description |
paymentNetwork | PKPaymentNetwork? | No | The payment method. For valid values, see PKPaymentNetwork. |
primaryAccountIdentifier | String? | Yes | A primary account identifier, used to filter out device token libraries. |
requiresFelicaSecureElement | Bool | Yes | Whether the device token requires the Felica Secure Element. Valid values are:
|
cardholderName | String? | No | The name of the person as shown on the card. |
encryptionScheme | PKEncryptionScheme | Yes | The encryption scheme to be used in this request. For valid values, see PKEncryptionScheme. |
Response parameters
N/A
Sample
class IssuerExtensionHandler: PKIssuerProvisioningExtensionHandler {
// ...
override func passEntries(completion: @escaping ([PKIssuerProvisioningExtensionPassEntry]) -> Void) {
IAPApplePay.availablePassEntries { result in
switch result {
case .success(let passEntries):
// handle success and completion passEntries
completion(passEntries)
case .failure(let error):
// handle error and completion empty array
completion([])
}
}
}
}