I migrated my app to RC, however old subscribed users are having a sync problem.
Previously, I was using react-native-iap library for subscriptions and receipts validations in the client side.
if (
isSubscribedInOldSystem // not able to get this information
&& !isSubscribedInRevenueCat
) {
Purchases.syncPurchases();
}
Because of RC, I had to remove react-native-iap from my packages.json to prevent crashes and libraries incompatibilities.
I never stored any users subscriptions informations and I am now unable to get the isSubscribedInOldSystem to syncPurchases. I need your help. Is there any way to proceed?
Thank you in advance,
Paul
Best answer by Tech Team
Hi!
I think for your case, where you don't have access to `isSubscribedInOldSystem`, your safest bet would be to do something like:
if (!isSubscribedInRevenueCat && !haveCheckedSinceMigration) {
Purchases.syncPurchases();
setHaveCheckedSinceMigrationToTrue();
}
Where the "haveCheckedSinceMigration" is something like a boolean that you store on the device (like using UserDefaults or sharedPreferences), that starts out false, and after the first time you call syncPurchases, gets set to true, and will stay true in future app launches.
This way you guarantee that you're being efficient with regards to syncing purchases, but you're also not leaving anyone out that had access before.
I think for your case, where you don't have access to `isSubscribedInOldSystem`, your safest bet would be to do something like:
if (!isSubscribedInRevenueCat && !haveCheckedSinceMigration) {
Purchases.syncPurchases();
setHaveCheckedSinceMigrationToTrue();
}
Where the "haveCheckedSinceMigration" is something like a boolean that you store on the device (like using UserDefaults or sharedPreferences), that starts out false, and after the first time you call syncPurchases, gets set to true, and will stay true in future app launches.
This way you guarantee that you're being efficient with regards to syncing purchases, but you're also not leaving anyone out that had access before.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.