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.
This will be called when paywall fails to show due to an unsuccessful paywall download or if an invalid trigger is provided. (See Fallbacks section for more details.)
Use these methods to check current user subscription status.
Copy
Ask AI
/** * Checks if the user has any active subscription (including non-renewable) */export const hasAnyActiveSubscription = async (): Promise<boolean>;/** * Checks if the user has any entitlement */export const hasAnyEntitlement = async (): Promise<boolean>;
There are currently two ways you can handle a “fallback” situation in the rare case that a paywall fails to download or an invalid trigger is provided. You can also do both. Better to be prepared!
If a paywall has not completed downloading when you attempt to present it, a loading state can show.By default, Helium will show this loading state as needed (a shimmer view for up to 2 seconds). You can configure, turn off, or set trigger-specific loading budgets.If the budget expires before the paywall is ready, a fallback paywall will show if available otherwise the loading state will hide and onFallback will be called.
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