Server driven UI for SwiftUI
Server driven UI for SwiftUI means your backend describes a page as JSON and the iOS client renders native SwiftUI, not a WebView.
Read articleLong-form writing on server driven UI for SwiftUI: architecture, schema, widgets, and production notes. Documentation stays the source of truth; these articles are the why.
Server driven UI for SwiftUI means your backend describes a page as JSON and the iOS client renders native SwiftUI, not a WebView.
Read articleAtoms are the reusable JSON shapes behind widgets: TextData, ColorData, ImageData, FontData. Dark variants live on the color atom.
A SwiftUI JSON schema for SDUI is the envelope plus widget layout and atoms. It is a contract, not a visual builder file.
The Flow-UI JSON envelope is a page with optional header and footer, sections, and widgets. One document describes the whole native screen.
PageStore owns the decoded page. WidgetStateStore owns per-widget state. SwiftUI Observation is how the view tree stays in sync.
Dynamic SwiftUI screens are pages the backend composes. The client does not hardcode the widget list; it renders whatever the envelope contains.
Flow-UI renders JSON as SwiftUI on iOS 17 using Observation and PageStore. Paste a payload in the playground to see the same pipeline.
JSON becomes SwiftUI when the registry maps a type string to a WidgetView and the renderer emits that view for each widget in the page.
An SDUI page is sections of widgets. That envelope is the whole contract. Screens and cards are not types in Flow-UI.
The rendering engine walks sections, resolves each widget type in the registry, and lays out native SwiftUI. Unknown types drop out.
A server driven UI architecture on iOS is decode, registry, contain failures, render widgets, dispatch actions. Flow-UI names those types.
A JSON page that picks among widgets already in the binary is data. Downloaded executable code is not. Keep the payload declarative.
Feature flags toggle code you already shipped. Remote config swaps copy and numbers. SDUI rearranges native widgets from JSON. They stack; they are not the same.
Skip SDUI for maps, heavy gestures, latency-critical canvases, and apps that change UI once a quarter. Use it for feeds, merchandising, onboarding, and experiments.
Native SDUI means the widget is a real SwiftUI view: scrolling, gestures, and accessibility come from the platform, not from HTML.
Implement SDUI on iOS by decoding a page envelope, registering widgets, containing unknown types, and dispatching actions as data.
Build server driven UI in SwiftUI with four pieces: a JSON envelope, a widget registry, a renderer, and host networking. Worked path using Flow-UI.
SDUI renders native SwiftUI from JSON. A WebView renders HTML in a browser process. Teams pick SDUI when the page should feel like the rest of the app.
API driven UI and remote UI are names for the same idea as server driven UI: the API returns page structure, the iOS app paints SwiftUI.
Backend driven UI, server driven UI, BDU, and SDUI are the same split: the server describes the page, the client renders native views.
SDUI for Swift is a JSON envelope, an open widget registry, and a renderer. Not a new language, not a downloaded script.
SDUI on iOS is native SwiftUI rendered from a JSON page. A WebView is a different product with different scrolling, gestures, and accessibility.