Skip to content

Conversation

@tonidero
Copy link
Contributor

This is a working PoC of enabling usage of the presentPaywall function in Expo Go. There are some questionable decisions taken to make it work:

  • The client needs to wrap their app in a WebViewPaywallProvider object so we can inject the modally presented paywall on demand. This is a relatively common pattern in RN, but it's not great we need to do this only for Expo Go :(. Other alternatives considered were adding some native functions that can be used to present the paywall on a window/VC on top of the RN UI which is also pretty complex and might require also a lot of wiring.
  • Adds another optional peer dependency react-native-webview which needs to be included to make it work
  • The WebView loads a different instance of purchases-js into the webview from unpkg. This can be dangerous since we basically have 2 instances of purchase-js running, which might not be in sync...
Screen_recording_20251127_151813.mp4

@tonidero tonidero added the pr:feat A new feature label Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants