react-native-purchases icon indicating copy to clipboard operation
react-native-purchases copied to clipboard

`presentPaywallIfNeeded` and `Restore Purchases`

Open rikur opened this issue 1 year ago • 4 comments

Describe the bug Paywall remains open, even if restoring purchases from the paywall fulfills the requiredEntitlementIdentifier requirement. There's also no programmatic way to close the paywall from JavaScript side.

Additional context The paywall should close once the requiredEntitlement is fulfilled. I think there should also be a programmatic way of closing the paywall via the JS API.

Using React-Native and latest version of react-native-purchases and react-native-purchases-ui.

rikur avatar Feb 24 '24 23:02 rikur

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

RCGitBot avatar Feb 24 '24 23:02 RCGitBot

With the current limitations, the only way I can get a good UX for the Paywall is using Template 1 - Jaguar Content as a Footer, and managing Restore Purchases event and close button placement in my custom content.

rikur avatar Feb 25 '24 00:02 rikur

Hi @rikur, thanks for reaching out! A couple questions:

  • Can you reproduce this in Android, iOS or both?
  • What version of the SDK are you using?

An option you could try is to use the RevenueCatUI.PaywallView component instead, since that will present the paywall as a view, giving you more flexibility into when to show the paywall https://www.revenuecat.com/docs/tools/paywalls/displaying-paywalls#react-native

tonidero avatar Feb 26 '24 08:02 tonidero

@tonidero Thank you for your response.

I'm currently using the <RevenueCatUI.PaywallFooterContainerView> and <RevenueCatUI.Paywall /> and they indeed offer a lot more flexibility.

The issue is on both iOS and Android, and I think the programmatic call to display paywalls could be improved over time. The minimum functionality that would make them more useful is a programmatic way of closing the paywalls (this way I can use the listener to close the paywall if restoring purchases fulfils the entitlement requirement).

"react-native-purchases": "7.21.0",
"react-native-purchases-ui": "7.21.0",

rikur avatar Feb 28 '24 01:02 rikur

Hi @rikur, sorry we missed this,

If you're using PaywallFooterContainerView or Paywall, you can use the onPurchaseCompleted and/or onRestoreCompleted callback functions to detect the new values for entitlements and dismiss the Paywall.

And yeah, we're definitely improving this over time so we appreciate the feedback. Lmk if that works for you!

tonidero avatar Apr 09 '24 07:04 tonidero

@tonidero I am having the exact same issue, also using presentPaywallIfNeeded. I was wondering if there is any progress in fixing it?

As it stands my users would have to restore purchase, close the app and re-open it again to have their premium access enabled.

maximilian avatar Apr 12 '25 06:04 maximilian