Containers
Sparkling content always runs inside a native container — a platform view that hosts the Lynx runtime. The SDK provides two container modes to fit different use cases.
Two container modes
Full-page containers
Full-page containers are the default way to display Sparkling content. The native layer manages the navigation bar, status bar, screen orientation, and loading/error views — you configure them via scheme parameters.
iOS
Android
Configuration via scheme
Full-page containers are configured through URL query parameters. Some common ones:
See Scheme for the full parameter list.
Embedded containers
Embedded containers let you place Sparkling content anywhere inside a native layout. You control the frame, and the container renders Lynx content within it.
iOS — SPKContainerView
Content sizing (iOS)
By default, the container keeps its assigned frame. Set sparkContentMode to let the container resize based on Lynx content:
After loading completes, read preferredLayoutSize to get the content's intrinsic size.
Android — SparklingView
Lifecycle
Full-page containers
Lifecycle is managed automatically. The SPKViewController / SparklingActivity forwards viewDidAppear / onResume and viewDidDisappear / onPause to the Lynx runtime. No extra work needed.
Embedded containers
Since the SDK has no control over your hosting view controller or fragment, you must forward visibility events manually. If you skip this, the Lynx runtime won't know when to pause timers, animations, or network requests.
iOS:
Android:
Lifecycle delegate (iOS)
Set containerLifecycleDelegate on the SPKContext to observe loading status. This works for both container modes:
Communicating with Lynx
Both container modes support sending events and updating global props at runtime.
Send events
iOS (both modes):
Android (embedded):
Update globalProps
iOS (both modes):
Android (embedded):
Next steps
- Scheme — full list of URL parameters for configuring containers
- Multi-page Navigation — navigate between pages, pass data, close pages
- Sparkling SDK — iOS — iOS API reference
- Sparkling SDK — Android — Android API reference

