I’ve recently migrated my React Native application from using react-native-iap for handling in-app subscriptions to RevenueCat.
I’m wondering how this migration affects existing users who already purchased a subscription through the old react-native-iap setup. Specifically:
-
Will those users automatically retain access to their premium features once I switch to RevenueCat?
-
If not, what steps do I need to take to ensure their previously active subscriptions are recognized in RevenueCat?
-
Do I need to do anything special (such as syncing historical purchases or importing users) for RevenueCat to detect their old subscriptions?
Additionally, my app already includes a “Restore Purchases” button that previously worked with react-native-iap.
If I now connect that button to RevenueCat’s restore method (Purchases.restorePurchases()), will it correctly detect and restore subscriptions that were originally made before the migration?
Basically, I want to make sure that users who paid under the old system won’t lose access after the migration.
```
const handleRestore = useCallback(async () => { setIsLoading(true);
try { const customerInfo = await Purchases.restorePurchases();
if ( typeof customerInfo.entitlements.active === "object" && Object.keys(customerInfo.entitlements.active).length > 0 )
{
Alert.alert("Success", "Your purchases have been restored!", [ { text: "OK", onPress: () => navigation.navigate("Main"), }, ]);
}
else { Alert.alert( "No Purchases Found", "We couldn't find any active subscriptions to restore.", [{ text: "OK" }] ); }
}
catch (error: any) {
console.error("🎭 PaywallScreen: Restore error:", error);
Alert.alert( "Restore Failed", error.message || "Unable to restore purchases. Please try again.", [{ text: "OK" }] );
}
finally {
setIsLoading(false); }
}, [navigation]);
```
