Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

iOS

The Push Provisioning SDK supports iOS for Apple Pay push provisioning.

Prerequisites

  • iOS 13.0+

  • Xcode 14.0+

  • Swift 5.0+

info-circle

  • 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 iap_entitlements@apple.com.

In your email, include the following information:

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:

Add the In-App Provisioning capability.

For more details about how to set up Apple Pay, see Setting Up Apple Pay.

Integrating Push Provisioning SDK

  1. Download the latest release of Push Provisioning SDK and extract the ZIP file.

  2. Go to the Xcode project folder, and create a new folder "TPCSDK".

  3. Put the extracted TPCSDKSwift.xcframework in the folder.

  4. In the app target, select General > Frameworks, Libraries, and Embedded Content, click + > Add Other > click Add Files.

  5. Select the TPCSDKSwift.xcframework and click Open.

Add the XCFramework to your app target.

Ensure that Embed & Sign is selected as follows:

Set the framework to Embed & Sign.

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

Set Framework Search Paths.
Set Header Search Paths.

Configuration

Add the following configuration to your application to use the Push Provisioning SDK.

Import the TPCSDKSwift module in your AppDelegate.swift:

Configuration

Import a header into the project

  1. Create a Bridging-Header.h file by creating a Swift file.

  2. 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:

info-circle

Note

Due 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.

exclamation-circle

Note

All 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?