The Helium SDK does its best to fetch the latest paywalls to display in your app. But if for some reason a paywall is not available — perhaps if an app user temporarily did not have a data connection — Helium will attempt to show a “fallback”.By using a fallback bundle you can download copies of your actual Helium paywalls and include that in your app to use in the rare case that a Helium paywall is not ready for display.
Go to the Workflows page in your dashboard and find the Download Fallbacks button:Click that to open a dialog and select which control paywalls you would like to include as fallback for their corresponding trigger.
If you update these paywalls (or add new ones) then you might consider doing this process again to get a newer fallback bundle.
Download the file. It should be named something like fallback-bundle-xxxx-xx-xx.json where the x ‘s are replaced with today’s date.
Integrate the SDK with the iOS Quickstart if you haven’t done so already.
Drag your downloaded bundle into the Project navigator of your Xcode project.
You should see a dialog with Action and **Targets **fields. For Action, either option (copy or move) is fine. For **Targets **ensure that your app’s main target is selected.
Then pass the bundle URL to Helium.initialize
let fallbackBundleURL = Bundle.main.url(forResource: "fallback-bundle-xxxx-xx-xx", withExtension: "json")Helium.shared.initialize( apiKey: apiKey, heliumPaywallDelegate: delegate, // ... other parameters ... fallbackConfig: HeliumFallbackConfig.withFallbackBundle(fallbackBundleURL))
Make sure to replace fallback-bundle-xxxx-xx-xx with the correct name!
Make sure to use the correct path and filename in your require call!
Integrate the SDK with the Flutter Quickstart if you haven’t done so already.
Drag your downloaded bundle into your Flutter project where desired.
In your pubspec.yaml add the new asset:
assets: - .env - fallback-bundle-xxxx-xx-xx.json # add this line
Pass in to Helium.initialize
heliumFlutter.initialize( // ... other parameters ... fallbackBundleAssetPath: "fallback-bundle-xxxx-xx-xx.json"
Make sure to use the correct filename in both pubspec.yaml and the call to initialize!
All done! If you want to test the fallback bundle, you can run your app with device in airplane mode and attempt to show a paywall. The corresponding fallback paywall should display!
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.