The SDK API
Registration mirrors custom components, keyed by a screen identifier:CustomScreenDefinition declares inputs, outputs, and the factory:
Reading inputs
CustomScreenParams exposes the resolved inputs with the same typed accessors as a component:
The screen context
CustomScreenContext lets the screen emit events and control the persistent zones drawn over it:
emitworks like a custom component’s emit: the named event enters the flow’s interaction system for the flow to act on. The name should match a declared output.setZonesVisible(_:)shows or hides the flow’s persistent UI (the nav bar, footer, and overlay zones) over your native screen. See Persistent UI (zones).setChromeVisible(_:)is deprecated and simply forwards tosetZonesVisible(_:). UsesetZonesVisible(_:).
Example
How a custom screen would be registered once the render path is active. A native paywall that emitspurchased to advance the flow:
purchased event to a goNext action so the flow moves to the next screen after the purchase.
Common mistakes
- Expecting it to render today. It will not. The registration succeeds but the SDK does not yet draw custom screens. Use a custom component instead.
- Same contract pitfalls as components. When this ships, the screen identifier, input keys, and event keys must match between the editor and the SDK.
- Forgetting to advance the flow. A custom screen that never emits an event leaves the user stuck on a native screen with no way forward. Always emit an event that a flow action can act on.
- Using
setChromeVisible. It is deprecated. CallsetZonesVisible(_:).