React Native
React Native, from install to paywall
BillDog’s React Native SDK 1.1.1-beta.5 on an Android phone: add the four native peers, configure it at startup, then edit the paywall with no new build.
What this video covers: Filmed on Android only: iOS and Expo aren’t shown, and no purchase is completed. The four native peers are @react-native-async-storage/async-storage, react-native-fs, react-native-svg and react-native-webview. A paywall published for the WebView renderer opens in a WebView.
Transcript
That paywall was designed in a browser. The app showing it is React Native, and the paywall is drawn natively, not in a web view.
This is a small sample app we built for this video, running on a real Android phone. The code that matters is on screen.
Install the package, pinned to an exact version. These are pre-release builds and the API is still moving, so a range can quietly pick up a version that a later step doesn’t expect.
Then its four native peers, by name: async storage, the file system, SVG, and WebView. React Native only links the native packages your app lists itself.
Configure once, at startup, before any screen can ask for anything. Not inside a component, and not on the first paywall.
Use a sandbox key while you wire things up. Its traffic stays out of your live revenue.
Then show the paywall, by the identifier you gave it in the dashboard.
And notice what isn’t here. No button handlers, and no purchase call. In the default native view, the buttons already know what they do, because their actions came down with the paywall.
Beyond the paywall, the surface is small. getCustomerInfo asks what someone owns. entitlementsForProduct gives you the mapping. restore is the button the App Store expects. canMakePayments, because some devices can’t. And on iOS, presentCodeRedemptionSheet, for App Store offer codes.
There’s also a purchase controller, if you need to run purchases yourself. Most apps don’t.
Now the proof. This is the paywall as it’s published right now.
In the dashboard, change the headline, and publish.
Nothing in the app’s code knows what that headline says.
Update published, save, and it’s live.
Back on the phone, close the app and open it again. The new headline is already there.
Same build, a different paywall. No rebuild, and no new app version.
Install, configure, show. Underneath, it’s the native Android and iOS SDKs doing the work.