> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryhelium.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Helium is a paywall platform for mobile apps. Paywalls, workflows, triggers, targeting and experiments are configured in the dashboard (https://app.tryhelium.com); the SDK's job is to initialize, present a paywall for a trigger, and report purchases.
> Pick the SDK page for the user's platform: /sdk/quickstart-ios (Swift), /sdk/quickstart-android (Kotlin), /sdk/quickstart-react-native, /sdk/quickstart-flutter. Method names differ per platform; copy them from the page for that platform, never from another platform's page.
> Pages under /sdk/quickstart-ios-v3 and /sdk/quickstart-android-v0 are legacy SDK versions. Use them only when the user is on that version; for upgrades use the /migrations pages.
> For live dashboard data (paywalls, workflows, metrics) connect the Helium MCP server at https://app.tryhelium.com/api/mcp (see /ai-tools/mcp). For SQL over events, revenue, subscriptions and users use the Data Access API (/data-access/overview) and the helium-data-access skill (/data-access/agent-skill). This documentation site also exposes a docs-search MCP server at https://docs.tryhelium.com/mcp.
> Web checkout (App2Web) with Stripe or Paddle is a separate flow from in-app purchases; start at /web-checkout/overview.
> Every page is available as Markdown by appending .md to its URL. The full index is at https://docs.tryhelium.com/llms.txt.

# Testing Your Paywalls

> Preview any paywall on device via deep links before it is live.

## Test Via Deep Links

Once you get this set up, you'll be able to scan a QR code from the Helium dashboard and have that paywall show on your device!

> [tab] iOS
>
> ### Step 1: Add URL Scheme
>
> Open your project in Xcode and add a URL scheme ([official Apple documentation here](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app)):
>
> 1. Select your app target
> 2. Go to **Info** tab
> 3. Expand **URL Types** section
> 4. Click **+** to add a new URL type
> 5. Set **URL Schemes** to: `helium-test`
> 6. Set **Identifier** to your bundle ID (e.g., `com.company.myapp`)
>
>    ![New Scheme Pn](https://mintcdn.com/helium/rKQOIu7pMSaYpNTG/images/new-scheme.png?fit=max\&auto=format\&n=rKQOIu7pMSaYpNTG\&q=85\&s=465abe57a2814776609adb7485ee7c73)
>
> ### Step 2: Handle Deep Links
>
> Add the following to handle incoming test links:
>
> ```swift SwiftUI theme={null}
> import Helium
>
> @main
> struct MyApp: App {
>     var body: some Scene {
>         WindowGroup {
>             ContentView()
>                 .onOpenURL { url in
>                     Helium.shared.handleDeepLink(url)
>                 }
>         }
>     }
> }
> ```
>
> ```swift SceneDelegate theme={null}
> import Helium
>
> class SceneDelegate: UIResponder, UIWindowSceneDelegate {
>     func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
>         Helium.shared.handleDeepLink(URLContexts.first?.url)
>     }
> }
> ```
>
> ```swift AppDelegate theme={null}
> import Helium
>
> class AppDelegate: UIResponder, UIApplicationDelegate {
>     func application(_ app: UIApplication,
>                      open url: URL,
>                      options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
>         return Helium.shared.handleDeepLink(url)
>     }
> }
> ```

> [tab] React Native
>
> ### Step 1: Add URL Scheme
>
> Add the following to your **app.json** or **app.config.js**:
>
> ```json theme={null}
> {
>   "expo": {
>     "scheme": "helium-test"
>   }
> }
> ```
>
> > [!NOTE]
> >
> > If you already have a scheme set, you can switch to a list format: `"scheme": ["my-scheme", "helium-test"]`
>
> ### Step 2: Handle Deep Links
>
> Add the following to your main App component
>
> ```typescript theme={null}
> import { useEffect } from 'react';
> import * as Linking from 'expo-linking';
> import { handleDeepLink } from '@tryheliumai/paywall-sdk-react-native';
>
> export default function App() {
>     useEffect(() => {
>         // Handle deep links when app is already open
>         const subscription = Linking.addEventListener('url', (event) => {
>             handleDeepLink(event.url);
>         });
>
>         // Handle deep link that opened the app
>         Linking.getInitialURL().then((url) => {
>             handleDeepLink(url);
>         });
>
>         return () => subscription.remove();
>     }, []);
>
>     // Rest of your app
>     return <YourApp />;
> }
> ```

> [tab] Flutter
>
> ### Step 1: Add URL Scheme
>
> Add the following to `ios/Runner/Info.plist`:
>
> ```html theme={null}
> <key>CFBundleURLTypes</key>
> <array>
>     <dict>
>         <key>CFBundleURLSchemes</key>
>         <array>
>             <string>helium-test</string>
>         </array>
>         <key>CFBundleURLName</key>
>         <string>com.example.myapp</string>
>     </dict>
> </array>
> ```
>
> > [!NOTE]
> >
> > Replace `com.example.myapp` with your bundle ID.
>
> ### Step 2: Handle Deep Links
>
> Install the [**app\_links**](https://github.com/llfbandit/app_links) package by running:
>
> ```shellscript theme={null}
> flutter pub add app_links
> ```
>
> Or by running `flutter pub get` after adding directly to  `pubspec.yaml`:
>
> ```yaml theme={null}
> dependencies:
>   app_links: ^6.4.1
> ```
>
> Then in your root app widget:
>
> ```dart theme={null}
> // for StreamSubscription
> import 'dart:async';
> // for app_links and Helium
> import 'package:app_links/app_links.dart';
> import 'package:helium_flutter/helium_flutter.dart';
>
>
> class MyApp extends StatefulWidget {
>   @override
>   _MyAppState createState() => _MyAppState();
> }
>
> class _MyAppState extends State<MyApp> {
>   StreamSubscription<Uri>? _linkSubscription;
>
>   @override
>   void initState() {
>     super.initState();
>
>     // Add code to instantiate AppLinks
>     _linkSubscription = AppLinks().uriLinkStream.listen((uri) {
>       HeliumFlutter().handleDeepLink(uri.toString());
>     });
>   }
>
>   @override
>   void dispose() {
>     // Good practice, though not strictly necessary for root widget
>     _linkSubscription?.cancel();
>     super.dispose();
>   }
>
>   // Rest of your app
> }
> ```

> [!TIP]
>
> `handleDeepLink` will return true if the test paywall was successfully shown.

### Step 3: Test

1. Run your app.
2. Visit the desired paywall in the [dashboard](https://app.tryhelium.com/paywalls).
3. Click the QR code button, this should open a dialog with a QR code.
4. Scan it from your device camera.
5. The paywall should display from your app.

> [!NOTE]
>
> To see the latest changes to the paywall, you may need to restart your app and scan again. (We are working on improving this.)

> [!NOTE]
>
> Only paywalls that are configured in an active workflow can be displayed via test link. Also, workflows with experiments may display any of the paywalls in the experiment. (We are working on improving this too.)

### Explicit URL Testing

Instead of scanning, you can also craft the test link manually:

1. Open Safari and navigate to: `helium-test://helium-test?trigger=YOUR_TRIGGER_NAME` .
2. Tap "Open" when prompted to open in your app.
3. The paywall for the specified trigger will be opened.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.