Search code examples
iosflutterin-app-purchase

Test Flight receipts disappear after app restart


We are rolling out an app on Test Flight for internal testing. Our app has in-app subscriptions. We are trying to test our restore purchases function, but after app restarts the receipt is gone. Is this normal behavior or are we doing something wrong?


Solution

  • One big caveat in the sandbox environment is that there is no receipt file on the device until a purchase is made. This differs from the production sandbox and production environments, where a receipt file is generated at the time of installation. To fully test restores in the sandbox, you need to add a button, gesture, or other means to revert the app to the unsubscribed state.

    1. Subscribe to a monthly subscription.
    2. Use a button/gesture to revert the app to the unsubscribed state.
    3. Tap the “Restore Purchases” button.
    4. If done before the 35-minute subscription cycle, an active subscription should be found, and the app should change to the subscribed state.

    (Don't forget to remove button/gesture from #2 before releasing)