Hello,
End-to-end testing of IAP is painful.
On iOS, I can’t do Storekit testing on simulator without running through Xcode (how to implement in headless ci?). Also I can’t do Storekit testing on a release archive. I don’t have the budget to run on real devices.
On Android, it kind of works, but is especially painful because automating the purchase UI is not trivial and flaky.
While I could mock at my app level (i.e. at JS level in my case), I don’t get any guarantee that the purchases will work in the real world. I already had so many issues with purchases working here and not there, that’s why I’m now using RC. I don’t want to have responsibility over this part of the code.
It would be very convenient to be able to set a different API key in Purchases.configure() and then all the purchases would success without going through real App store / Play store stuff. Different API keys could also be created with different expected behaviours such as “Always approve” or “Always declines”. Those purchases would appear as “Sandbox” in the Dashboard.
For now I still don’t know how I should reliably do e2e testing on my subscriptions. Comments are welcome !