osikes / cordova-plugin-dynamic-applepay-stripe

0 stars 1 forks source link

Apple pay working on debug build but not release #1

Open itslenny opened 5 years ago

itslenny commented 5 years ago

I've got this plugin working perfectly on a local test device, but when I deployed to the app store it stopped working.

I can reproduce it by doing a "release" build. On the same phone if I do a debug build it works fine, but if it's a release build I get the error "apple pay error This device can make payments but has no supported cards". I'm pretty certain this error message is incorrect since it works fine using a debug build on the same device.

Is there some separate place I need to set the certificate for release build or something?

itslenny commented 5 years ago

I figured it out. I have NO IDEA where (or if) this is in the xCode ui, but in the root of the project there are 2 files Entitlements-Debug.plist and Entitlements-Release.plist.

The following appeared in the debug one, but not the release:

<key>com.apple.developer.in-app-payments</key>
<array>
  <string>merchant.myapp-here.com</string>
</array>

Feels like this is something xCode should do automatically, but copying these lines to the release plist fixed the issue.

However, the error message apple pay error This device can make payments but has no supported cards should still be addressed. I'm not sure if that is part of this plugin or just passed through from the stripe sdk.