I migrated my app to 4.0 of purchases-ios and released it on Testflight.
When I install the app on a device with an active subscription, the subscription status is lost (with all the associated features).
If I re-install the App Store version, the subscription status is back.
Purchasing works correctly in Xcode / debug.
Any idea what’s happening?
Thanks
Migration to RC 4.0: subscription status ignored in Testflight
Best answer by joshdholtz
So, because of that there is nothing cached because its a whole new instance and you need to migrate which… makes sense 😅
We don't have anything to help the migration from one user default to another 😔 This is something you would need to do yourself before initializing `Purchases`. But it does look like there are some people that have solutions for this like this one - https://gist.github.com/dougdiego/945fd2e33769cf5f1338
The reason this is happening is because anonymous ids (which I think you are using) are not being transferred so RevenueCat no longer knows who the user is. If you migrate from one user default to the new one this should be fixed!
Some things to note here:
- If you called a `syncPurchases`, your purchases should be restored but a new anonymous without doing the user default migration but unsynced user attributes (if you are using those) will be lost
- And with this ^, your data might be skewed because a “new” user is being added to RevenueCat even though its the same user
Let me know if there is anything else I can help without outside of this or if migration doesn’t work! And we are discussing how we can handle this automatically within the SDK and/or prevent this from happening in the future 😇
Happy RevenueCat-ing!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.