Setting up Tap to Pay on iPhone
Request and configure the required entitlement to support Tap to Pay on iPhone.
Overview
Tap to Pay on iPhone lets merchants accept contactless payments using an app on their iPhone, without having to connect external hardware. Your app uses the ProximityReader framework to read the payment method someone presents.
To integrate with ProximityReader and use Tap to Pay on iPhone, you need to request the Tap to Pay on iPhone Entitlement. To access the request form, you need to have an organization-level Apple Developer account and be logged in as the Account Holder. Apple reviews each application using predefined criteria. If your request meets the criteria, Apple adds the entitlement to your developer account using managed capabilities. For more information, see Provisioning with capabilities.
After you receive the entitlement, you need to configure your Xcode project to use it, which involves several steps. You create or update an App ID, generate a provisioning profile, and add the entitlement to the Info.plist file for your target. Your project’s code signing settings might also require minor changes.
Add the Tap to Pay on iPhone capability to your App ID
Follow these steps to update your App ID to include the necessary capability:
Create an App ID for your app if you don’t already have one. For more information, see Register an App ID.
Sign in to your Apple Developer account and select Certificates, IDs & Profiles.
Select Identifiers in the menu on the left.
Select your app from the list.
Click the Additional Capabilities tab.
Enable the Tap to Pay on iPhone capability.
Click the Save button.
Create a new provisioning profile for the updated App ID. For more information, see Create a development provisioning profile.
Download the new provisioning profile
Follow these steps to use the new provisioning profile to code sign your app:
In Xcode, select your project in the Project navigator.
In the project editor, click the Signing & Capabilities tab.
Click All in the scope bar, and then deselect “Automatically manage signing”.
Click the Provisioning Profile pop-up menu and choose Download Profile.
Select your ProximityReader provisioning profile from the left column and click Select Profile.
Add an entitlements file
In Xcode, you need to create a file to specify the entitlements necessary for your app to use Tap to Pay on iPhone.
To create the entitlements file:
In Xcode, select your project in the Project navigator.
Choose File > New > File from Template, select Property List from the Resource section, and click Next.
Enter
your_project.entitlementsas the filename, replacingyour_projectwith the name of your project, and click Create.In the project editor, click the Build Settings tab.
Click All and Combined in the scope bar.
Use the search box to find the Code Signing Entitlements setting.
Enter the full path to the
.entitlementsfile from step 3 as the setting’s value.Open the file in Xcode and add
com.apple.developer.proximity-reader.payment.acceptanceas a Boolean value.
The following example shows the contents of an app’s .entitlements file with the Tap to Pay on iPhone capability:
<key>com.apple.developer.proximity-reader.payment.acceptance</key>
<true/>