iOS
The Push Provisioning SDK supports iOS for Apple Pay push provisioning.
Prerequisites
iOS 13.0+
Xcode 14.0+
Swift 5.0+
For full Apple Pay functionality, run on physical devices.
Do production testing in the Production Environment on production devices, using Ad Hoc provisioning profiles, TestFlight, or the App Store. Do Pre-Production testing from Xcode.
Push Provisioning Access
Apple Pay push provisioning requires a special Apple entitlement named com.apple.developer.payment-pass-provisioning. Request it by emailing [email protected].
In your email, include the following information:
Your app name.
Your Developer Team ID, available in Apple Developer Membership.
ADAM ID (your app's unique numeric ID), found in App Store Connect or in the App Store linked to your app, for example, https://apps.apple.com/app/id123456789.
Once Apple grants the entitlement, add the distribution entitlement to a provisioning profile. Use the same profile to develop the app in Xcode.
In your project, open or create the entitlements file. Add the com.apple.developer.payment-pass-provisioning key with a Boolean value YES.
Then, in your app target, go to Build Settings > Signing > Code Signing Entitlements. Ensure it points to the entitlements file.
Also add the In-App Provisioning capability in the app configuration:

For more details about how to set up Apple Pay, see Setting Up Apple Pay.
Integrating Push Provisioning SDK
Download the latest release of Push Provisioning SDK and extract the ZIP file.
Go to the Xcode project folder, and create a new folder "TPCSDK".
Put the extracted
TPCSDKSwift.xcframeworkin the folder.In the app target, select General > Frameworks, Libraries, and Embedded Content, click + > Add Other > click Add Files.
Select the
TPCSDKSwift.xcframeworkand click Open.

Ensure that Embed & Sign is selected as follows:

If you use an Objective-C project, set Framework Search Paths and Header Search Paths.


Configuration
Import a header into the project
Create a
Bridging-Header.hfile by creating a Swift file.Import the TPCSDKSwift header file in
Bridging-Header.h.
Add the configuration code to your application
Import the TPCSDKSwift module in your AppDelegate:
To enable Swift framework support, ensure that the following project definitions exist:
NoteDue to a bug in Xcode, you must create at least one Swift file (it can be empty) in the project. Include it in Build Phases > Compile Sources.
Configure the Push Provisioning SDK in your application:didFinishLaunchingWithOptions: delegate function.
NoteAll PKPassLibrary operations (isCardDigitized, getCardDigitizationResult, activatePass, ...) are not thread-safe. Run them on a single thread. https://developer.apple.com/documentation/passkit/pkpasslibrary
Last updated
Was this helpful?