Skip to main content
Mobile SDK Changelog

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.


iOS Push Provisioning v1.1.0

· One min read

Added

  • Integrated Analytics for better tracking.
  • Swift Package Manager support.

To install the Weavr Push Provisioning iOS SDK using Swift Package Manager (SPM) you will need to:

  1. Open your Xcode project.
  2. Navigate to File > Add Packages...
  3. In the search bar, enter the following URL, replacing <TOKEN> with the token we provided you (see the Get Started guide):
    https://user:<TOKEN>@github.com/weavr-io/push-provisioning-ios
  4. Select the version you wish to use. Weavr adheres to Semantic versioning and so recommend using the Up to next major version dependency rule.
  5. Click Add Package to integrate the SDK into your project, and select the target where you want to add the SDK.