Skip to main content
Helium requires iOS 15+ and Xcode 14+

1. Install the SDK


2. Initialize Helium

Initialize as early as possible in your app’s lifecycle — before any paywall is shown. Your API key is available in the Helium dashboard → Profile.

3. Show a Paywall

Before calling presentPaywall, make sure you have a trigger and workflow configured in the Helium dashboard.
presentPaywall
method

The following steps are optional but strongly recommended for production apps.

Identify Users

User identification is optional. It improves targeting accuracy and event attribution in external analytics. If you’re unsure whether you need it, you likely don’t — but it’s easy to add. Identify users before calling Helium.shared.initialize to ensure consistency from the first session.
If your app uses an appAccountToken for purchases, share it with Helium so it can be applied to paywall purchases.

Paywall Events

Helium emits events throughout the paywall lifecycle. You can handle them per-presentation or globally.

Per-presentation handlers

Pass a PaywallEventHandlers instance when calling presentPaywall:

Global event listener

Use a global listener to handle events across all paywalls without passing handlers at each call site.
Important: Listeners are held weakly. If you don’t keep a strong reference to your listener object, it will be deallocated immediately and no events will fire.
To remove a listener:
You can also forward all events to an existing analytics provider.

Fallback Paywalls

Set up fallbacks to handle the rare case where a paywall fails to load. This is strongly recommended before going to production. Follow the fallback bundle guide once you have a production paywall ready.

Checking Entitlements

Check entitlement status before showing a paywall to avoid showing it to users who are already subscribed.

Advanced

RevenueCat Integration

By default, Helium manages purchases directly. If you’re already using RevenueCat, use the HeliumRevenueCat package instead to keep RevenueCat in control.

Install HeliumRevenueCat

  1. In Xcode, go to Package Dependencies.
  2. Click + and enter:
  3. Add the HeliumRevenueCat product to your app’s main target.
HeliumRevenueCat depends on purchases-ios-spm, not purchases-ios. If you’re currently using purchases-ios with SPM, switch to purchases-ios-spm to avoid build conflicts.

Configure

Set the RevenueCatDelegate before calling Helium.shared.initialize:
If you omit revenueCatApiKey, initialize RevenueCat yourself before instantiating RevenueCatDelegate.

Keeping appUserID in sync

If you change the RevenueCat appUserID, sync the value to Helium:

Custom Purchase Handling

By default, Helium handles purchases for you. This section is for apps that need custom purchase logic.
Tip: If you only need to augment the built-in logic, subclass StoreKitDelegate or RevenueCatDelegate and call super on any methods you override.
To fully replace purchase handling, implement HeliumPurchaseDelegate:
Reference implementations: StoreKitDelegate · RevenueCatDelegate

Additional Methods

In most cases you don’t need this — Helium shows a loading indicator automatically if the paywall hasn’t finished downloading.
Use this to verify a paywall is ready before attempting to display it.
Resets Helium so initialize can be called again. Useful after changing user traits that affect paywall targeting.