Skip to main content

iOS Push Provisioning v1.2.0

ยท 2 min read

Overviewโ€‹

The SDK exposes a new method WPPComponents.getCardStatusInWallet(forCardWithLastFourDigits:, deviceType:) that can be used to check the status of a given card within the Apple Pay wallet of the device.

It takes the following as arguments: a String representing the last four digits of the payment card number and a DeviceType that specifies which device the state should be checked against since it is possible to have a card provisioned in your iPhone, but not in your Apple Watch.

The DeviceType enumeration supports the following values:

  • phone - The card state query is performed on the device being used
  • watch - The card state query is performed on the user's Apple Watch

If the DeviceType is left empty, the card state query is performed on both the phone and the watch. The result is notAdded if either the watch or the phone has this state, regardless of the other device.

Changesโ€‹

  • canAddCardToWallet is deprecated in favour of getCardStatusInWallet
  • When calling from the extension, getCardStatusInWallet you MUST specify the device type.
  • When calling from the app, getCardStatusInWallet you MUST NOT include the device type. This ensures that the response, which indicates whether you need to show the Add To Wallet button or not, is in accordance with Apple's requirements. In the scenario where both phone and watch are available and the user taps Add to Wallet, they are given the option to select the desired device in the flow provided by Apple.

Fixโ€‹

  • Swift Package Manager. The issue encountered when attempting to distribute the code via Swift Package Manager in v1.1.0 has been fixed. The compiled SDK includes a Package.swift file, enabling users to automatically download and install it via Swift Package Manager.

    CocoaPods continues to be supported and is unaffected.