Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple Pay not working on release build (works on debug)

I got apple pay set up on my app, and everything was working great when I tested locally. I was able to put through real payments on a real device. Then, I pushed to the app store and it's no longer working.

I was able to repro locally by doing the "release" build instead of a debug build, and I get the following error:

apple pay error This device can make payments but has no supported cards

This is on the same same phone that works fine with a debug build. So, I'm assuming this is just a bad error message. I'm pretty certain it has something to do with the debug vs release cert, but I can't find anywhere that those are set independently.

Additional notes:

  • In the apple developer portal apple pay is enabled for both "development" and "distribution".
  • Under capabilities in xcode apple pay is on, the merchant id is correct, and all the "steps" are checked. There doesn't appear to be build specific settings
like image 203
Lenny Avatar asked Oct 14 '25 13:10

Lenny


1 Answers

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.

like image 87
Lenny Avatar answered Oct 17 '25 07:10

Lenny