My app does validate the receipt on launch. When I do this via Xcode on app launch, I am presented with a Sign In prompt, because the Xcode version does understandably not include a receipt.
However, on TestFlight, the app also does not include a receipt or at least I am seeing the same prompt which should be the result of refreshing the receipt on launch if none is available.
I am wondering if this will also happen for apps downloaded from the App Store? I think it would be bad UX to have the first thing happen in the app be asked to sign in with you Apple ID. Or is this related to the app using the "sandbox" environment via TestFlight?
Any hints will be appreciated. Thanks!
The receipt data is found at Bundle.main.appStoreReceiptURL, and contains information about all in-app purchases in the app.
- This property always exists in an App Store app.
- It does not exist in a sandbox app (Xcode or TestFlight).
Apple say:
This property makes no guarantee about whether there is a file at the URL—only that if a receipt is present, that is its location.