Reputation: 41
I'm implementing Wallet Extension for adding credit card on wallet, I created both extension, UI and NonUI, but the "From apps on your iPhone" option never shows to me.
My extensions have the same entitlements of main app, with the com.apple.developer.payment-pass-provisioning.
My NonUI status function implementation:
final class MBFApplePayNonUIExtensionHandler: PKIssuerProvisioningExtensionHandler {
override func status(completion: @escaping (PKIssuerProvisioningExtensionStatus) -> Void) {
let status = PKIssuerProvisioningExtensionStatus()
status.requiresAuthentication = true
status.passEntriesAvailable = true
status.remotePassEntriesAvailable = true
completion(status)
} ....
**I tried this to: **
final class MBFApplePayNonUIExtensionHandler: PKIssuerProvisioningExtensionHandler {
override func status(completion: @escaping (PKIssuerProvisioningExtensionStatus) -> Void) {
let status = PKIssuerProvisioningExtensionStatus()
status.requiresAuthentication = true completion(status)
} ....
Extensions .plists:
NonUI:
<plist version="1.0">
<dict>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.PassKit.issuer-provisioning</string>
<key>NSExtensionPrincipalClass</key>
<string>MBFApplePayNonUIExtensionHandler</string>
</dict>
</dict>
</plist>
UI:
<plist version="1.0">
<dict>
<key>NSExtension</key>
<dict>
<key>NSExtensionMainStoryboard</key>
<string>MBFApplePayUIExtension</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.PassKit.issuer-provisioning.authorization</string>
</dict>
</dict>
</plist>
What am I missing?
Upvotes: 4
Views: 1341
Reputation: 2028
Change Extensions' "Minimum Deployments" to a lower iOS version, than your physical device's iOS version.
Here is how I came up with this and how it can be relatable to your case:
I've wasted 2 days trying to figure out how to show our app in the "From Apps on Your iPhone".
I've verified hundreds of times that the entitlements, Info.plist and other capabilities are all correct, enabled, according to the documentation, and nothing seemed to work.
I noticed that my extensions were not even invoked, and the breakpoints were turning into "disabled", dotted breakpoints.
This lead me to investigate why the breakpoints become "dotted", which turns out is that the compiler decides to disable these breakpoints if it "sees" that this breakpoint won't be accessed at any point.
Turned out, when I created the UI and Non-UI extensions, these by default will set their "Minimum Deployments" to the latest iOS version it can, in my case it was to "iOS 18", while my real device was still running on iOS 17.5.1. Once this deployment level was lowered, the app was shown as expected in the Wallet under "From Apps on Your iPhone".
Such a silly mistake where I've spent so much time debugging it, and thinking that something must have been wrong with the entitlements, or IDs sent to Apple.
Upvotes: 0
Reputation: 23
Ні In your IntentHandler, you call "status(completion:)", but if you would like to show the entry point "From apps on your iPhone", you must also return passEntries or remotePassEntries values (mandatory one but you can also more). For exemple, if you use the func passEntries, return a completion ([PKIssuerProvisioningExtensionPaymentPassEntry()]) After that, you can see the entry point. Best regards.
Upvotes: 0