Summary
React Native & Flutter: This guide applies for anyone upgrading React Native / Flutter from 0.x.x to 3.0.x. React Native and Flutter did not have a major version 1 or 2.
Breaking Changes in v3.0:
- Minimum iOS version: Now requires iOS 15.0+ (up from iOS 14.0)
What’s new:
- Event handlers can be passed directly to
presentUpsell
- Loading budgets for paywall downloads
- Improved event system
- StoreKitDelegate used by default (iOS only)
customPaywallTraits
can be set when showing a paywall
Event Handlers in presentUpsell
You can now pass completion handlers directly when presenting paywalls.Before v3 (iOS example)
v3
Loading Budget for Paywalls
Before v3, if a Helium download was in progress but you wanted to show a paywall immediately (e.g., on app open), the Helium SDK would just show you a fallback paywall. In v3.0, it’ll now show a loading state (by default, a shimmer view for 2 seconds) and wait for the download to complete. You can configure, turn off, or set trigger-specific loading budgets.How It Works
Configure Loading Budgets
Set different loading budgets per trigger or globally:Custom Loading Views (iOS only)
Provide custom loading views during the budget period:Disable Loading Budget
To show fallback immediately without waiting:Required Fallbacks (iOS only)
Fallbacks are mandatory. You must either provide afallbackConfig
(v3.0 way) or a fallbackPaywall
(old way). The SDK will fail to initialize without some type of fallback configuration.
Before (v2.x)
After (v3.0)
Per-Trigger Fallbacks
Configure different fallbacks for different triggers:Event System Changes
The event system now uses protocol-based events with better type safety and IDE support.Key Event Changes From Before v3
Name Changes
paywallTemplateName
→paywallName
productKey
→productId
- All
subscription*
events →purchase*
events (e.g.,subscriptionSucceeded
→PurchaseSucceededEvent
) ctaPressed
event →PaywallButtonPressedEvent
error
is nowError
type instead ofString
onPurchaseFailedEvent
React Native & Flutter had several changes to event
type
:- ctaPressed → paywallButtonPressed
- offerSelected → productSelected
- subscriptionPressed → purchasePressed
- subscriptionCancelled → purchaseCancelled
- subscriptionSucceeded → purchaseSucceeded
- subscriptionFailed → purchaseFailed
- subscriptionRestored → purchaseRestored
- subscriptionRestoreFailed → purchaseRestoreFailed
- subscriptionPending → purchasePending
Removed
configId
removed from download success events
New Delegate Method (iOS only)
Before v3
onHeliumPaywallEvent(event:)
(deprecated but still works)
v3
onPaywallEvent(_:)
(recommended)
StoreKit Delegate by Default (iOS only)
If no delegate is provided, v3.0 uses StoreKitDelegate automatically.Before (v2.x)
After (v3.0)
Custom Paywall Traits
You can now pass custom paywall traits when displaying a paywall, replacing the deprecatedHeliumPaywallDelegate.getCustomVariableValues
method.
Minimum iOS Version
Update your app’s minimum deployment target to iOS 15.0 or later.- Select your project in Xcode
- Go to your app target
- Set “Minimum Deployments” to iOS 15.0
Need Help?
- Review the iOS SDK Quickstart
- See the Complete Example App on GitHub
- Contact support via Slack or founders@tryhelium.com