Client‑approved UI pipelines: letting AI propose screens you still control

AI can safely propose full iOS screens if you put a client‑approved UI pipeline in front of it: the model generates a candidate layout as structured data, your…

Exploded mechanical approval stamp assembly symbolizing a client-approved AI UI pipeline

AI can safely propose full iOS screens if you put a client‑approved UI pipeline in front of it: the model generates a candidate layout as structured data, your server validates that payload against a strict schema and whitelist, and only then does the iOS app render it as native SwiftUI. This pattern lets you unlock generative UI without giving up control, App Store compliance, or UX quality.

In this article we’ll break down how a Uzori‑style pipeline works, why Apple’s rules and modern AI reliability make server‑validated UI essential, and how iOS teams can integrate it with a single SwiftUI screen.

What is a client‑approved UI pipeline?

A client‑approved UI pipeline is a declarative contract between:

  • The AI agent, which proposes screens as structured layouts (JSON, OpenUI, etc.).
  • The server, which validates those layouts against a schema and component registry.
  • The iOS app, which renders only approved payloads as native SwiftUI views.

Instead of shipping arbitrary remote code, you ship:

  • A fixed set of SwiftUI components and navigation primitives.
  • A schema that describes legal screens and layouts.
  • A validation layer that enforces that contract for every AI‑generated response.

This is the core idea behind Uzori’s approach: AI generates candidate UI, but your backend decides which screens are allowed to reach the device.

Why iOS teams need control: Apple guidelines and governance

The main reason you need a client‑approved UI pipeline on iOS is simple: Apple forbids downloadable code that changes app behavior.

  • App Store Review Guideline 2.5.2 says apps must be self‑contained and may not download, install, or execute code that introduces or changes features or functionality.
  • That rules out “LLM sends Swift code, client compiles and runs it” as a viable architecture.

A client‑approved pipeline solves this by making everything data‑driven, not code‑driven:

  • AI sends layout data (which components to use, how to arrange them, what copy to show).
  • The app renders that data using already‑shipped SwiftUI types.
  • No new executable code ever crosses the wire.

Governance trends reinforce this need for control:

  • Gartner reports that 75% of IT application leaders are piloting or deploying AI agents, but only 15% are considering fully autonomous ones.
  • 74% see agents as a new attack vector, and only 13% strongly agree they have the right governance structures.
  • Separate Gartner research shows organizations doing regular AI system assessments are over 3x more likely to report high GenAI value.

A server‑validated UI pipeline is a concrete governance measure: nothing renders until your backend approves it.

From AI answer to SwiftUI screen: the Uzori‑style architecture

At a high level, a Uzori iOS SDK UI framework implements this data‑driven pattern for you.

The architecture looks like this:

  1. User intent enters through a SwiftUI screen
    • A single “assistant” view captures user queries, selections, and actions.
    • The app sends those, plus any local state, to your backend.
  2. Backend orchestrates AI + business logic
    • Your server calls an LLM, providing:
      • User request and context.
      • Your OpenAPI spec or other API description.
      • A UI schema describing allowed components, layout containers, and style tokens.
    • The model responds with a candidate UI description: sections, lists, forms, carousels, etc.
  3. Server validates the generated UI
    • The payload is checked against:
      • A JSON / OpenUI schema.
      • A whitelist of components (e.g., PrimaryButton, ProductCard, FormSection).
      • A style registry (tokens for typography, spacing, and colors).
    • Invalid pieces (unsupported components, wrong props, forbidden styles) are:
      • Rejected outright, or
      • Automatically corrected where safe.
  4. Approved layout is streamed to the iOS app
    • The server sends an approved, structured UI payload over a streaming connection.
    • The Uzori iOS SDK composes SwiftUI screens from that payload in real time.
  5. SwiftUI renders only the approved payload
    • Each component in the payload maps to a concrete SwiftUI view type.
    • Navigation and state transitions are declarative and tied to known actions.

This pipeline lets you generate native iOS UI from LLM responses while staying strictly inside Apple’s rules and your own governance policies.

For a deeper architectural dive into server‑driven UI, see this related guide: Server-driven UI on iOS: turn AI answers into native SwiftUI in real time.

Schema‑first design: structure over chaos

Modern AI platforms increasingly rely on schema‑first design for reliability.

  • OpenAI’s Structured Outputs ensure model responses adhere to a JSON schema.
  • In their own eval, gpt‑4o‑2024‑08‑06 followed schemas 100% of the time, vs <40% for older gpt‑4‑0613.
  • OpenUI’s language claims to be up to 67% more token‑efficient than JSON, and supports server‑side correction of invalid output while it streams.

For an AI iOS UI SDK, a schema‑first approach means:

  • You define screen types: feed, details, wizard, comparison, configuration.
  • You define container types: VStack, HStack, grid, pager, sheet, alert.
  • You define component types: text, image, button, toggle, picker, chip, card.
  • You define style tokens: spacing scales, typography sizes, semantic colors.

The AI can only compose screens using those building blocks.

This keeps your generative UI predictable, debuggable, and brand‑consistent.

Whitelisted components and styles: how the client enforces control

The key to an iOS secure AI app architecture is a strict whitelist enforced on the client.

On the SwiftUI side you typically have:

  • A component registry mapping layout elements to views:
    • "primary_button" -> PrimaryButtonView
    • "product_card" -> ProductCardView
    • "form_field.text" -> TextFieldView
  • A style registry mapping tokens to modifiers:
    • "heading" -> .font(.title).fontWeight(.semibold)
    • "body" -> .font(.body)
    • "accent" -> .tint(brandAccent)

When a screen description arrives, the SDK:

  1. Deserializes the payload into typed models.
  2. Verifies that every component key exists in the registry.
  3. Applies only known styles, ignoring anything not whitelisted.
  4. Composes the tree into SwiftUI views, using your shipped types.

Anything unknown is never rendered.

This gives you strong guarantees:

  • No experimental component reaches users unless you add it to the registry and ship an update.
  • No off‑brand styling can bypass your design system.
  • No executable code ever crosses the network; only data does.

The server‑driven UI layer: validate before you stream

To keep client logic simple, Uzori pushes most complexity into a server‑driven UI layer.

That layer typically provides:

  • Schema validation
    • JSON Schema, OpenUI, or a custom typed DSL.
    • Ensures required fields, legal values, and correct nesting.
  • Component & style validation
    • Checks component identifiers against your registry.
    • Enforces allowed style tokens and layout constraints.
  • Business‑logic constraints
    • Prevents the model from exposing actions the user shouldn’t see.
    • Filters out unauthorized API calls and unsafe flows.
  • Streaming correction and fallback
    • As the model streams UI, the server can:
      • Fix minor structural issues.
      • Substitute fallback components.
      • Abort and send a known‑good error screen if validation fails.

Thoughtworks moved server‑driven UI back into their Radar’s Trial ring in 2026, citing faster production cycles and fewer app‑store review loops. Combining SDUI with generative UI, as Uzori does, extends that benefit to AI‑native experiences without sacrificing guardrails.

Example flow: AI concierge that feels native, not like a chat box

Imagine you’re building an AI concierge for a complex configuration flow—say, roaming protection and add‑ons.

Without a client‑approved UI pipeline, you might:

  • Show a chat box.
  • Let the model reply with paragraphs explaining options.
  • Ask the user to manually tap through static settings screens.

With a Uzori‑style SwiftUI AI SDK:

  1. User types: “I’m flying to Germany next week; what protection do I need?”
  2. The app sends this intent plus account context to your backend.
  3. The backend calls an LLM with:
    • Available plans and constraints (via OpenAPI).
    • A schema for wizard screens, comparison views, and recommendation cards.
  4. The model returns a candidate UI:
    • Step 1: A comparison screen of two recommended roaming bundles.
    • Step 2: A checklist of add‑ons (voicemail, data add‑on, travel alerts).
    • Summary: A confirmation screen with plan details and total cost.
  5. The server validates the payload and streams it to the app.
  6. The Uzori SDK renders:
    • Native SwiftUI cards, toggles, and step indicators.
    • On‑brand buttons wired to your existing purchase APIs.

From the user’s perspective, this isn’t “talking to a chatbot.” It’s a dynamic user interface that rearranges itself around their goal, using the same UX quality as the rest of your app.

Integration: one SwiftUI screen, infinite flows

Uzori is designed so iOS teams can integrate with a single screen rather than a new architecture.

At a conceptual level, you:

  • Add an UzoriAssistantView (or similar) to your app.
  • Provide configuration:
    • API base URL.
    • User/session tokens.
    • Optional feature flags (e.g., which flows are enabled).
  • Wire navigation:
    • Present the assistant modally or as a tab.
    • Delegate certain actions (e.g., push a specific native screen) back into your app.

Everything else—AI orchestration, server‑driven UI, validation, streaming—is handled by the backend and the SDK.

This aligns with what iOS engineering teams expect from best tools for server‑driven UI iOS development:

  • The client stays lean.
  • The backend controls flows.
  • Iteration happens server‑side without resubmitting to the App Store.

How this differs from other AI UI tools

Several 2026 AI UI solutions aim to turn LLM responses into interactive interfaces, but they vary in scope and safety.

Common patterns include:

  • Render spec + widgets (Voqal)
    • Spoken answer plus an array of widgets.
    • Currently supports 13 widget kinds.
  • JSON‑driven UI elements (Alan AI)
    • Dynamically creates interface elements from JSON.
  • Structured generative UI languages (OpenUI)
    • Token‑efficient layout descriptions.
    • Gateway that corrects invalid output while streaming.
  • Traditional SDUI (Plasmic)
    • Server specifies UI built from shipped components.

Uzori’s differentiators for iOS engineering teams:

  • SwiftUI‑native: not web views, not cross‑platform abstractions.
  • AI‑composed, server‑approved screens: generative UI plus SDUI safety.
  • Single‑screen integration: fits naturally with modern SwiftUI navigation.

If you care about AI UI tools stability quality comparison, the key metric is: does the tool let the model propose, while your server still decides? Client‑approved pipelines answer “yes” by design.

Actionable steps: designing your own client‑approved pipeline

You can adopt a similar pattern even beyond Uzori.

1. Define your UI schema

  • List the screen types you’re comfortable generating.
  • Enumerate the components and their props.
  • Decide on style tokens aligned with your design system.

2. Build a server‑side validator

  • Use JSON Schema or OpenAPI extensions to describe UI payloads.
  • Implement validation and normalization on the backend.
  • Add business‑logic checks for permissions and safety.

3. Configure the LLM for structured outputs

  • Use tools that support structured responses.
  • Provide your schema and detailed component descriptions.
  • Prompt for layouts, not paragraphs.

4. Implement a SwiftUI renderer

  • Create a component registry mapping schema nodes to views.
  • Add a streaming layer to update the screen incrementally.
  • Enforce whitelists and ignore unknown elements client‑side.

5. Start with a single AI concierge flow

  • Choose a high‑impact, constrained use case:
    • Onboarding wizard.
    • Product discovery.
    • Plan configuration.
  • Feature‑flag the experience and measure:
    • Completion rate.
    • Time‑to‑decision.
    • User satisfaction.

From there, you can expand into richer flows while keeping governance tight.

FAQ: client‑approved UI pipelines for iOS

How is a client‑approved UI pipeline different from a normal chat UI?

A normal chat UI shows text responses and asks users to interpret and act on them manually.

A client‑approved pipeline lets the AI respond with native screens—forms, carousels, wizards—validated by your server and rendered by your app.

Users interact directly with UI, not just language.

Does this approach comply with Apple’s App Store rules?

Yes, as long as you only download data and render it with already‑shipped code.

App Store Guideline 2.5.2 prohibits downloading executable code that changes app functionality.

Declarative UI payloads interpreted by SwiftUI components you compiled into the app are within safe bounds.

What happens if the model generates an invalid screen?

The server catches it during validation.

You can:

  • Reject the payload and return a safe error screen.
  • Auto‑correct minor issues (e.g., missing optional fields).
  • Log details for analysis and model prompt tuning.

The invalid layout never reaches the client.

How does Uzori use my existing backend APIs?

Uzori’s engine is designed to work with APIs described via OpenAPI or similar specs.

The model uses those definitions to:

  • Call your existing endpoints.
  • Build UI flows around real data and actions.
  • Stay within business rules enforced by your services.

Is this worth it if my organization already uses AI widely?

McKinsey found 88% of organizations regularly use AI, but only 39% see EBIT impact at the enterprise level.

A client‑approved UI pipeline helps close that gap by turning AI from “smart text” into operable product workflows—native screens that complete tasks, not just answer questions.

If you’d like to try a production‑ready SwiftUI AI SDK that implements this pipeline out of the box, you can explore Uzori at uzori.ai.

← All posts