RevenueCat/cordova-plugin-purchases

Callback for Purchases.syncPurchases()

Closed this issue · 2 comments

Since we are not supposed to call Purchases.syncPurchases() more than once per install, it would be great to have a callback to say if it was successful or not.

My code right now is:

if(!localStorage.getItem('rc-synced')) {
    Purchases.syncPurchases();
    localStorage.setItem('rc-synced', true);
}

Problem: If the device is offline or something else goes wrong, the sync won't happen and never will...

👀 SDKONCALL-232 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

Hi, we are currently working on a callback for that (it's a little tricky with differences between Apple and Google).

For the meantime, that would be as good of a workaround as we can get right now. Sorry for the inconvenience!