We are integrating Apple Pay In-App Provisioning in our banking application using an external SDK. The provisioning flow works on the iOS Simulator (mock sheet appears), but fails on real devices via TestFlight with the error:
internalInconsistency: "PKAddPaymentPassViewController can not be created"
Environment:
- Xcode 16
- iOS 18
- Real device: iPhone (tested via TestFlight / Distribution build)
- Card network: Mastercard
What we've verified:
com.apple.developer.payment-pass-provisioningentitlement is set toYESin our.entitlementsfile- The entitlement is confirmed present in our Development provisioning profile via
security cms -D -i embedded.mobileprovision | grep payment-pass→ returns<true/> PKAddPaymentPassViewController.canAddPaymentPass()returnstrueon the device- The card is NOT already in Apple Wallet (0 local/remote Secure Element passes)
- All provisioning data is present and valid (encryptedPayload, authorizationCode, primaryAccountSuffix, cardholderName)
- The external SDK is configured successfully at app launch
Diagnostic logs from TestFlight build:
canAddPaymentPass: true
Local SE passes: 0
Remote SE passes: 0
suffix: 6165
name: [redacted]
encryptedPayload length: 1130
authCode length: 514
scheme: Mastercard
Card already in Wallet: false
Error: internalInconsistency("PKAddPaymentPassViewController can not be created")
Testing matrix:
| Simulator | Mock sheet appears (not a real test) |
| Device + Debugger attached | PKAddPaymentPassViewController error |
| Device + Debugger detached (Dev build) | SDK error 903: "device environment unsafe" |
| TestFlight (Distribution) | PKAddPaymentPassViewController cannot be created |
Questions:
- Can
PKAddPaymentPassViewControllerfail to be created even whencanAddPaymentPass()returnstrue? What other conditions could cause this? - Is there a way to verify that the Distribution provisioning profile correctly includes the
payment-pass-provisioningentitlement after it has been approved by Apple? - Are there any additional Apple Pay entitlements or configurations (e.g., Wallet merchant setup, pass type identifiers) required beyond
com.apple.developer.payment-pass-provisioningfor In-App Provisioning to work? - Does regenerating the Distribution provisioning profile on Apple Developer Portal resolve cases where entitlements were added after the profile was originally created?
Any guidance would be greatly appreciated. Thank you.