Distinguishing Sandbox and Production Entitlements in live app

  • 10 January 2022
  • 2 replies


I have recently launched an iOS app which has been in beta for a while. The live app has subscriptions, but during the beta I added a “lifetime unlock” in-app purchase so that beta testers didn’t have to keep re-subscribing due to the accelerated subscription speed.

Now that the live app is out, I wanted to offer beta testers a promotional offer code to access a discounted subscription in the live app. However, in my testing, when I installed the live app over the beta app it immediately unlocked everything (as the lifetime unlock was still valid, despite being purchased in sandbox mode)

So I added code to the live app to ignore sandbox entitlements by checking the isSandbox flag on the EntitlementInfo (RCEntitlementInfo). This now works as expected, and I was able to purchase a new subscription in the live app despite having had one in the beta, however, today it is failing

When I try to purchase the monthly subscription in my live app, it tells me “You’re currently subscribed to this” (correct), I then hit “OK” and get a STORE_ERROR from RevenueCat (“There was a problem with the App Store.”)

Deleting and reinstalling the live app does not fix this. 

My hunch is that both production and sandbox purchases are present, and I only want to use the production one but the app is receiving the sandbox entitlement from the SDK. Is there a way to filter out only the production version of an entitlement from RevenueCat’s RCEntitlementInfos object? Should I even be doing this?

2 replies

Userlevel 4
Badge +9

Are you still having this issue? I’m not 100% sure what would cause this behavior other than device glitches. Have you tried rebooting your device and/or logging out of your sandbox account?


The only way I found to resolve this issue was to delete the user permanently in RevenueCat and then ask the user to restore purchases in the live iOS app.