`presentPaywallIfNeeded` and `Restore Purchases`
- [x] I have updated Purchases SDK to the latest version
- [x] I have read the Contribution Guidelines
- [x] I have searched the Community
- [x] I have read docs.revenuecat.com
- [x] I have searched for existing Github issues
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.
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
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.
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 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",
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 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.