React-Native - Migrating from Native App to React Native - Usage understanding problem of restorePurchases() and syncPurchases()

  • 23 November 2022
  • 1 reply



the topic is:

I build a React Native Follow Up of a native App which is already in stores (Google, Apple).

I have no access to the source code of the old App.

I want to enable the users possibility (after App update) to use their subscription which he/she/x have bought via the old native system.

I wonder if its necessary to call syncPurchases() on first App start ? 

Or will restorePurchases() (This will be triggered on users CTA click) do all what i need?

Looking forward to your answers.




Best answer by cody 29 November 2022, 19:53

View original

1 reply

Userlevel 5
Badge +8

Hey @codebdev!

Calling syncPurchases on app startup will take any existing transactions and sync it to RevenueCat in the background, so that seems like the way to go here, although you probably won’t want to call it every time, only if the users are newly created. It will ensure the users that launch the app for the first time have their purchases recognized in RevenueCat.

I’d also recommend having a restore purchases CTA somewhere in your paywall or settings, so in the event that a user’s purchases didn’t get synced automatically they can manually trigger it to force it to restore.