Search code examples
iosin-app-purchasetestflightproduction

iOS InApp purchases do not work in Production (okay in testflight)


I have 3 in-apps purchases available in the app. On the release that is in production, I go to the screen to choose a subscription plan. When I click the subscribe button, no bottom sheet opens up to confirm the price/subscription and ask the user to validate.

It is working fine in the testflight with the exact same build:

Testflight ScreenShot when clicking subscribe button

Testflight ScreenShot after the purchase is confirmed


Solution

  • The issue was coming from a wrong paramater passed to the validateIosReceipt function used in the code The second paramater should be false (isTests) when in production otherwise the wrong receipt validation url is being called

    But it means the same build cannot be used for TestFlight and for Production, as for TestFlight that parameter should be true, but in production should be false