Install the SDK using your preferred package manager:
Copy
Ask AI
npx expo install expo-helium
We support Expo 49+ but do recommend using Helium with Expo 53 and up. If you’re on an older version and having issues, ping us - we’ve got experience with all kinds of versioning, upgrade, and custom build plugin work.
HeliumProvider needed ONLY if using @tryheliumai/paywall-sdk-react-native (older Expo versions OR bare React Native).
HeliumProvider
Wrap a suitably root-y component with HeliumProvider. We recommend wrapping your navigation provider, but placing HeliumProvider UNDER your sentry error boundary, to make sure
errors get logged.
Use the presentUpsell method to present a paywall. presentUpsell takes in a dictionary
specifying the triggerName as well as an optional onFallback parameter defining custom fallback behavior (in case the user didn’t have a network connection)
Helium emits various events during the lifecycle of a paywall. If desired, you can handle these events in the onHeliumPaywallEvent callback. See Helium Events for more details.
To verify that the Helium pod is correctly installed in your project, run:
Copy
Ask AI
grep -E "Helium" ios/Podfile.lock > /dev/null && echo "✅ Helium found in ios/Podfile.lock" || echo "❌ Helium not found in ios/Podfile.lock" && grep -E "HeliumPaywallSdk" ios/Podfile.lock > /dev/null && echo "✅ HeliumPaywallSdk found in ios/Podfile.lock" || echo "❌ HeliumPaywallSdk not found in ios/Podfile.lock"
If not found, try these commands:
Copy
Ask AI
# regenerate the ios (and android) directoriesnpx expo prebuild --clean# run a development buildnpx expo run:ios # or npx expo run:ios --device
Assistant
Responses are generated using AI and may contain mistakes.