What’s New:
- Simplified
initialize()- just pass your API key - Automatic fallback bundle detection (
helium-fallbacks.json) - Cleaner namespaced APIs:
Helium.identify,Helium.config,Helium.experiments,Helium.entitlements - New
HeliumPaywallSwiftUI component for embedded paywalls - HeliumRevenueCat is now a separate SPM package (CocoaPods unchanged)
Installation Update
Update your version constraint to~> 4.0:
- Swift Package Manager
- Cocoapods
Update the Dependency Rule in Xcode to allow 4.x versions, or remove and re-add the package with the new version constraint.
Initialize Migration
The biggest change in v4 is the simplified initialization. Configuration that was previously passed toinitialize() is now set on dedicated namespaces beforehand.
v3 (many parameters):
See the quickstart for more details.
presentUpsell to presentPaywall
The method has been renamed and now requires anonPaywallNotShown handler.
Full Example with All Parameters
v4:dontShowIfAlreadyEntitled now defaults to true in v4. Set it to false explicitly if you want to show paywalls to entitled users.API Namespace Migration
Helium.identify
| v3 | v4 |
|---|---|
initialize(customUserId:) | Helium.identify.userId = ... |
overrideUserId() | Helium.identify.userId = ... |
getHeliumUserId() | Helium.identify.userId |
setAppAttributionToken() | Helium.identify.appAccountToken = ... |
setRevenueCatAppUserId() | Helium.identify.revenueCatAppUserId = ... |
Helium.config
| v3 | v4 |
|---|---|
initialize(heliumPaywallDelegate:) | Helium.config.purchaseDelegate = ... |
setLightDarkModeOverride() | Helium.config.lightDarkModeOverride = ... |
Helium.restorePurchaseConfig | Helium.config.restorePurchasesDialog |
Helium.experiments
| v3 | v4 |
|---|---|
getExperimentInfoForTrigger() | Helium.experiments.infoForTrigger() |
enrolledExperiments() | Helium.experiments.enrolled() |
allExperiments() | Helium.experiments.all() |
Helium.entitlements
| v3 | v4 |
|---|---|
hasAnyEntitlement() | Helium.entitlements.hasAny() |
hasAnyActiveSubscription() | Helium.entitlements.hasAnyActiveSubscription() |
hasEntitlementForPaywall() | Helium.entitlements.hasForPaywall() |
hasActiveEntitlementFor() | Helium.entitlements.hasActiveFor() |
purchasedProductIds() | Helium.entitlements.purchasedProductIds() |
activeSubscriptions() | Helium.entitlements.activeSubscriptions() |
Fallback Changes
v4 removes fallback views and simplifies fallback configuration.What’s Changed
- No more fallback views - Use fallback bundles exclusively
- Automatic detection - SDK auto-detects
helium-fallbacks.jsonin your main bundle - Optional override - Use
Helium.config.customFallbacksURLif needed
Migration
v3:Download your fallbacks from the Helium dashboard. See the Fallback Bundle Guide for details.
Embedded Paywall Views
The SwiftUI view for embedding paywalls has been replaced.See ways to show a paywall for more information.
Removed APIs
The following APIs have been removed in v4:| Removed API | Replacement |
|---|---|
getHeliumExperimentInfo() (map version) | Helium.experiments.all() |
HeliumFallbackConfig class | Use Helium.config.customFallbacksURL |
All fallback* parameters from initialize | Add helium-fallbacks.json to bundle |
upsellViewForTrigger() | HeliumPaywall component |
Quick Migration Checklist
Use this checklist to ensure you’ve covered all migration steps:- Update SDK to 4.x (
~> 4.0) - Move user ID/traits to
Helium.identify.*beforeinitialize() - Move delegate/config to
Helium.config.*beforeinitialize() - Replace
presentUpsell()withpresentPaywall()and add required handler - Set up fallback bundle (download from dashboard, add as
helium-fallbacks.json) - Update experiment calls to
Helium.experiments.* - Update entitlement calls to
Helium.entitlements.* - Replace
upsellViewForTrigger()withHeliumPaywallcomponent - Test paywall presentation and purchases
Need Help?
- Review the iOS SDK Quickstart
- Contact support via Slack or [email protected]