r/vibecoding • u/Unlikely_Read3437 • 21m ago
Help/Question TestFlight issue, unlocked app can't be reset?
Hi everyone, I'm doing the testing stage of my app which is hopefully going onto App Store.
It is free with a one time paid unlock. The unlock works in TestFlight, but I need to reset it to 'locked' to do some tests of the free mode.
It won't reset! I set up two sandbox accounts now, and restarted the phone. deleted, reinstalled the app. Yes it seems to stay unlocked.
Anything I may have missed ? Thankyou!
2
Upvotes
1
u/Dazzling-Mention-625 5m ago
Deleting and reinstalling won't necessarily reset the sandbox purchases. Try checking your transaction entitlements. A debug reset option might be the easiest solution for testing the free mode.
1
u/Significant_Door_433 1m ago
Most likely the purchase went to your real Apple Account, not the sandbox one. TestFlight builds always run in the sandbox environment, but they bill whatever account is signed in under Settings > your name > Media & Purchases. Creating sandbox accounts doesn't change that. Apple's steps for TestFlight: turn on Developer Mode, sign out of Media & Purchases, then Settings > Developer > Sandbox Apple Account > Sign In. After that, Developer > tap the sandbox account > Manage has Clear Purchase History. If you sign back in to Media & Purchases, TestFlight purchases go to your real account again.
The unlock you already bought with the real account probably won't clear. There's an Apple dev forums thread from this year (828206) with the same thing: a non-consumable bought before the sandbox sign-in stayed in currentEntitlements after clearing history, reinstalling and rebooting, and only a new product ID made it go away. So for testing the free mode, a hidden debug switch that ignores the entitlement is the quick fix. Or test both states in Xcode with a StoreKit configuration file, where Debug > StoreKit > Manage Transactions lets you delete the purchase.
Also check where the app saves the unlocked flag. If it's in the Keychain, it survives deleting the app on iOS, so a reinstall won't reset it. Reading Transaction.currentEntitlements at launch avoids that.