Hi,
I’m having an issue with an in-app purchase implementation using StoreKit and a WKWebView.
The app uses a WKWebView with a WKScriptMessageHandler registered with the name "iap" to communicate between JavaScript and the native Swift code.
The implementation works correctly when running the app through Xcode Simulator. The IAP buttons trigger the expected native code and the bridge functions correctly.
However, when I install the same/latest build through TestFlight, the IAP functionality does not work as expected. The buttons/JavaScript-to-native communication do not appear to trigger the same way they do in the Simulator.
The IAP products and configuration have been set up in App Store Connect.
I have already checked the implementation and confirmed that the same code works when running from Xcode.
Could there be any difference between Simulator and TestFlight regarding:
StoreKit sandbox/TestFlight behaviour
Entitlements or signing
App Store Connect configuration
WKWebView/WKScriptMessageHandler behaviour
JavaScript-to-native communication in a TestFlight build
Any required configuration for IAP testing through TestFlight
I would appreciate any guidance on what I should check to determine why the "iap" WKScriptMessageHandler works in Simulator but not in TestFlight.
Thanks.