What Is Server UI? Server-driven UI for iOS & SwiftUI
Server UI — on iOS — is the practice of generating structured UI descriptions (typically JSON) on the server and sending them to the app so it can render…

Server UI — on iOS — is the practice of generating structured UI descriptions (typically JSON) on the server and sending them to the app so it can render native SwiftUI screens, for example a server-generated JSON schema that renders a three-card roaming-plan comparison with buttons, toggles, and detail drawers. In modern server-driven UI iOS frameworks, that JSON UI schema for SwiftUI can be produced directly from LLM responses and backend data, letting you generate native iOS UI from LLM responses while the client enforces design tokens and component safety.
How Server-driven UI Works on iOS (JSON UI Schema → SwiftUI)
In a Server UI pattern, the server sends a structured layout description instead of just business data, and the client turns that into native views. You define a JSON UI schema for SwiftUI — cards, lists, forms, buttons, stacks — and your iOS app has a component registry that maps each schema node to a safe, native SwiftUI component.
On each user interaction, the app posts events (like "selected plan" or "filter changed") to the server, which responds with a new or updated layout description. SwiftUI's declarative model makes this flow natural: state on the client is updated from the server-driven layout, and SwiftUI recomposes the hierarchy automatically.
With Server UI, the server owns the structure and sequence of screens while the client owns rendering details such as spacing, accessibility modifiers, and design tokens. This split lets you evolve flows and layouts without shipping a new binary, a key advantage in iOS app development where App Store releases can otherwise slow experimentation.
Why Server UI Matters for AI-native iOS Apps
Server UI matters because it turns AI from a text generator into a real interface builder. Instead of returning a paragraph of recommendations, your AI layer returns a JSON schema describing cards, filters, and actions that become native SwiftUI.
This approach solves a major pain point for iOS teams: LLM output is powerful but fragile when you try to convert free-form text into shippable UI. By constraining AI to emit structured layout data that your backend validates, you get the speed of generative UI with the reliability of server-driven UI. It also fits the way Apple expects SwiftUI to work — you “state what your user interface should do,” and the framework manages updates — except now the server is co-authoring that declarative description.
For mobile organizations under heavy release pressure, Server UI reduces the need for frequent hotfixes when you want to tweak a flow. Runway’s 2025 survey found mobile engineers spend about 5 hours per release on manual tasks and that 77% of teams need hotfixes every 3–5 releases, which underscores the value of pushing more UI decisions to the backend.
Uzori: LLM Co-authoring & LLM-generated SwiftUI Screens for iOS
Uzori applies Server UI specifically to SwiftUI and AI, turning the pattern into an AI interface layer rather than a generic templating system. The core idea is that both your LLM and your backend co-author the JSON UI schema, while the client stays in control of native components, performance, and design-system enforcement.
At a high level, the flow looks like this:
- Your backend exposes APIs, often described via OpenAPI.
- An LLM is given those APIs plus user intent and asked to produce a structured layout and data-fetch plan.
- The server converts the LLM suggestion into a concrete JSON UI schema for SwiftUI (cards, lists, forms, comparison tables).
- The schema is validated and checked against an allowlisted component set before being sent downstream.
- The Uzori SDK for SwiftUI receives the schema and renders native screens, streaming updates as the conversation or flow progresses.
This gives you LLM-generated SwiftUI screens that still feel like the rest of your app: same components, spacing, typography, and accessibility rules. AI orchestrates rich, task-specific flows (concierges, product explorers, configuration wizards), while your server-driven UI layer ensures every screen stays within a safe, typed contract.
For more depth on this pattern, its architecture, and performance considerations, see the in-depth guide: Server-driven UI on iOS: turn AI answers into native SwiftUI in real time.
Validate Generated SwiftUI on the Server & Stream SwiftUI Screens to the App
A critical aspect of Server UI in an AI context is validation: you never want arbitrary remote code execution or untrusted layout logic running on device. Instead, the server enforces a JSON schema, validates every generated screen, and only then streams it to the client.
A typical operational flow for safe, AI-native Server UI on iOS looks like this:
- Schema definition – You define a JSON UI schema SwiftUI can render: containers (VStack, HStack, ZStack), content components (Text, Image, Button, Toggle, Picker), and higher-level patterns (card list, form section, tabbed view). Each component has typed props.
- Allowlisted registry – You maintain a server-side registry of allowed components and props. Anything the LLM proposes must conform to this registry.
- LLM generation – The LLM generates candidate layouts using structured outputs, constrained by the JSON schema. OpenAI reports 100% reliability in schema-following for its latest models when structured outputs are used, a big improvement over older prompt-only approaches.
- Validation & enrichment – The server validates the JSON, fills in missing defaults, and attaches references to backend APIs (e.g., "/plans" for data, "/subscribe" for actions).
- Streaming to client – The validated layout is streamed to the iOS app, often in incremental chunks so the user sees the interface "build itself" as AI progresses.
- Client-side enforcement – On-device, Uzori’s SwiftUI layer enforces design tokens (spacing scales, corner radii, typography variants), accessibility, and platform conventions. The client never executes logic from the server; it only renders known components using local code.
This split — generative UI on the server, strict schema validation plus client-side design enforcement — addresses the trust concerns highlighted in DORA’s 2025 report, where 30% of surveyed technologists reported little to no trust in AI-generated code. With Server UI, AI suggests layouts, but the system ensures those suggestions are safe before any user sees them.
LLM Workflows: Generate Native iOS UI from LLM Responses
Server UI becomes especially powerful when paired with LLM workflows that understand your backend and your design language. Instead of free-form answers, you can design a pipeline where AI co-authors UI under tight constraints.
A typical "generate native iOS UI from LLM responses" flow for Uzori looks like this:
- OpenAPI → tools – You describe backend APIs via OpenAPI and expose them as tools or functions the LLM can call.
- User intent → plan – The user asks for something complex (e.g., "Help me choose the best roaming protection for a two-week trip to Tokyo and Paris"). The LLM infers the needed steps and data: fetch available plans, compute per-country coverage, highlight tradeoffs.
- LLM co-authoring UI – Guided by a JSON UI schema SwiftUI understands, the LLM proposes a layout: a card stack of plans, a filter bar for countries, a comparison view with key attributes.
- Server UI assembly – The backend converts that proposal into a fully typed Server UI description, plugs in real data, and validates it.
- Uzori SDK rendering – The Uzori SDK SwiftUI component receives the schema and renders an interactive, native interface where users can tap to expand details, toggle add-ons, and finalize a plan.
This pattern turns "LLM co-authoring UI" into a production-ready capability: AI selects structures from a constrained vocabulary, your backend owns correctness and safety, and the iOS client renders everything within your design system. You avoid the brittleness of post-processing text, and instead rely on structured outputs aligned with your SwiftUI component model.
Tools & Frameworks for Building Server-driven UI on iOS
Several tools and frameworks support Server UI or adjacent patterns on iOS. They differ in focus — some aim at generic server-driven UI, others at AI-native SwiftUI.
- Uzori (AI-native Server UI) – A SwiftUI iOS SDK that turns AI answers into native SwiftUI screens in real time. It focuses on LLM-generated SwiftUI screens, server-side validation, and streaming conversational interfaces within an existing iOS app.
- DivKit (cross-platform SDUI) – An open-source server-driven UI engine where the layout is generated on the server and described in JSON, then rendered on iOS, Android, and web. DivKit emphasizes dynamic layout updates without app releases and is a strong benchmark for traditional SDUI.
- Apollo GraphQL SDUI guidance – A design guide rather than a runtime, but highly influential. It recommends a component registry, client-side design tokens, and server-side control over UI shape, closely matching the Server UI philosophy.
- Custom JSON SDUI stacks – Many teams build their own lightweight Server UI layer: a JSON or GraphQL schema describing containers and components, a SwiftUI renderer on the client, and backend services that select layouts per user segment or experiment.
For iOS engineers specifically interested in non-chat AI interfaces for mobile — concierges, product explorers, and dynamic configuration flows — Uzori’s approach to Server UI offers a more opinionated, AI-focused alternative to generic SDUI engines. You keep your existing architecture and SwiftUI patterns, while adding a server-side layer that can stream structured, AI-composed screens into a single integrated view.
Related Terms & How Server UI Differs
Engineers often confuse Server UI with nearby concepts. A few quick contrasts help clarify the boundaries:
- Server-driven UI (SDUI) – Server UI is essentially a practical application of SDUI: the server describes screens as structured layout data, the client renders native views. The term Server UI here emphasizes the concrete JSON UI schema SwiftUI consumes.
- Not Chat UI – Server UI sends screens, not text bubbles. A chat UI might embed a few buttons in a message; Server UI can send full card grids, comparison tables, and multi-step flows as native interfaces.
- Not Remote Code Execution – Server UI never sends executable code to the client. It sends data that maps to precompiled, allowlisted components. This is crucial for security, performance, and App Store compliance.
Understanding these distinctions makes it easier to evaluate server-driven UI iOS frameworks and AI UI tools stability quality comparison, particularly when you need AI UI solutions that don’t break existing flows or bypass platform safety guarantees.
Example: Roaming-plan Concierge Built with Server UI
To make Server UI concrete, imagine building an AI roaming-plan concierge in a SwiftUI iOS app. The goal is to help users choose coverage across multiple countries, a problem that quickly becomes complex if handled via plain chat.
Here’s how Server UI shapes that experience:
- User request – The user types: "I’m traveling to Japan and France for two weeks; show me the best roaming options." This request is sent to your backend and AI layer.
- LLM + backend plan – The LLM inspects available roaming products via OpenAPI-described APIs, computes coverage, and decides the best way to present options: a plan comparison screen.
- Server UI description – The backend constructs a JSON UI schema: a scrollable card list where each card is a plan, showing price, data limits, and coverage; a segmented control to switch between "cheapest" and "best coverage"; a detail sheet that expands with more information per country.
- Validation & streaming – The schema is validated against your Server UI contract and then streamed to the app through Uzori’s SDK, potentially in small increments as AI refines the suggestions.
- Client rendering with design tokens – The SwiftUI client renders each card using your existing components — same typography, spacing, and accessibility labels as the rest of the app. If the server requests a "PrimaryButton" with a "Subscribe" action, the client instantiates its local PrimaryButton view, not an arbitrary button from the server.
- User interaction loop – As the user filters, expands details, or changes travel dates, the app sends events back to the server. Each event can produce a new Server UI description — perhaps showing a different set of plans or highlighting a data-top-up option — which the client renders immediately.
From the user’s perspective, they’re never reading a long AI answer and translating it into taps. Instead, AI builds the interface directly: the roaming-plan flow designs itself in front of them as native SwiftUI. From the team’s perspective, you’ve compressed weeks of UI iteration into an AI-driven, server-controlled layout that can evolve without frequent app releases.
If you want to experiment with this kind of Server UI pattern — combining server-side layout description, LLM co-authoring, and SwiftUI-native rendering — you can explore the SDK and demos at uzori.ai.