Georgii EmelianovEngineering

Generative UI for Native iOS: Every Option, Honestly Compared

AI UX shouldn’t be a chat box pasted on top of your app—it should be your app’s interface.

Senior iOS engineer comparing generative UI options for native SwiftUI and cross-platform runtimes.

AI UX shouldn’t be a chat box pasted on top of your app—it should be your app’s interface.

If you’re an iOS team trying to generate UI from LLM responses, you’re probably stuck between:

  • Native SwiftUI and server‑driven UI (SDUI)
  • Cross‑platform stacks like React Native or Flutter
  • Experimental “LLM-to-code” tools that promise magic, but rarely compile

This article compares those options honestly, from the perspective of senior iOS engineers shipping AI-native features in 2026.

We’ll focus on three questions:

  • How well does each option support AI-generated UI?
  • What’s the impact on performance and native feel?
  • How safe and maintainable is it at scale?

The criteria: what actually matters for generative UI

Before comparing tools, it’s worth stating the evaluation criteria explicitly.

When you’re trying to generate native iOS UI from LLM responses, the key dimensions are:

1. Native fidelity & UX quality

You care about:

  • Using real iOS controls (SwiftUI/UIKit) and platform conventions.
  • Matching your existing design system and accessibility setup.
  • Avoiding “webview in an app” vibes.

Apple’s own guidance still pushes SwiftUI as the best choice for new apps, describing it as declarative, data‑driven, and tightly integrated with the platform.

2. Performance and responsiveness

Generative UI is dynamic:

  • Screens might be composed on the fly based on user intent.
  • AI may call your backend multiple times during a session.
  • You’re streaming layouts and content, not just static views.

React Native’s New Architecture and Flutter’s compiled runtime are fast, but both document real tradeoffs around animation smoothness, JS thread saturation, and native embedding.

3. Safety, privacy, and review compliance

With AI in the loop, your UI layer touches:

  • User data passed to the model.
  • Third‑party AI services.
  • Dynamic layouts that are not in your shipped binary.

Apple now requires privacy manifests for certain third‑party SDKs (from February 12, 2025) and explicitly calls out third‑party AI data sharing in App Review guidelines.

Any generative UI solution must:

  • Keep arbitrary remote code out of the client.
  • Make data flows auditable and declarative.
  • Fit cleanly into App Store privacy disclosures.

4. Developer ergonomics & iteration speed

For AI interfaces, your team needs to:

  • Iterate rapidly on flows (setup wizards, concierges, product explorers).
  • A/B test layouts and sequences.
  • Keep the client slim, with most complexity server‑side.

Apple’s UICoder paper highlights that UI code is roughly half of a GUI app’s codebase, making automation attractive—but only if generation is reliable and structured.

5. Compatibility with structured, AI-generated UI

Modern LLM APIs (OpenAI, etc.) now emphasize:

  • Structured outputs using JSON Schema.
  • Function calling to interact with backend APIs.

For generative UI, the winning pattern is:

  • AI generates schema‑conforming UI descriptions, not free‑form code.
  • Server validates those descriptions and translates them into native views.

This is the pattern Uzori is built around, and it’s increasingly reflected in mainstream AI tooling.

Option 1: Native SwiftUI + server-driven UI (SDUI)

Overview

SwiftUI is Apple’s declarative UI framework for iOS, iPadOS, macOS, watchOS, tvOS, and visionOS.

Server-driven UI (SDUI) is the pattern where layout, components, and sometimes navigation are described by the server and rendered by the client.

SDUI frameworks for iOS (including JSON UI frameworks and tools like DivKit) now power hundreds of apps in production. Yandex reports DivKit is used to create more than 330 apps, with a visual editor and forms/animations added in its 2025 update.

Why SwiftUI is the best baseline for AI-generated native UI

Apple positions SwiftUI as:

  • Declarative and data-driven.
  • Easy to preview and iterate in Xcode.
  • Composable with existing UIKit code.

For AI-generated SwiftUI interfaces, this matters because:

  • The model can operate on data (schemas) rather than free‑form code.
  • You can treat generated views like any other SwiftUI screen in your navigation and state architecture.
  • You keep full access to platform-native accessibility and performance.

SDUI + SwiftUI: strengths for generative UI

When you combine SDUI with SwiftUI, you get:

  • Dynamic user interfaces driven by server JSON schemas.
  • One client implementation of your layout engine, reused across flows.
  • Remote control for experimentation and personalization.

This aligns well with AI:

  • LLMs output structured JSON that matches your SDUI schema.
  • Your server validates and resolves that JSON into safe SwiftUI views.
  • The client streams and renders those views as native, high‑fidelity screens.

Where Uzori fits

Uzori sits directly at this intersection of generative UI and SDUI.

The Uzori iOS SDK (SwiftUI) focuses on:

  • A single-screen integration point: you drop one SwiftUI view into your app.
  • An AI engine that consumes user requests plus your backend APIs (often described via OpenAPI).
  • Returning server-validated, AI-composed SwiftUI screens, streamed directly in the app.

Key benefits for iOS teams:

  • Compress weeks of UI iteration into a streaming, AI‑driven interface.
  • Let AI orchestrate rich flows (concierges, comparison views, configuration wizards) using your existing backend.
  • Keep everything native and safe—no arbitrary remote code, only schema‑validated layouts.

If you’re building transaction dispute flows, for example, Uzori can turn an AI explanation like “Where did my money go?” into a four‑step status interface, not a wall of text. Our related deep-dive guide, “Where did my money go? — a transaction dispute is a four‑step status answer”, walks through how that kind of dynamic, AI-driven flow works in practice.

Tradeoffs

Native SwiftUI + SDUI is not magic. You still need:

  • A well‑designed UI schema that models your components.
  • A server validation layer to enforce safety and constraints.
  • Observability around what the AI is generating and why.

But compared to free‑form code generation, this is:

  • Easier to test.
  • Easier to reason about.
  • More compatible with Apple’s privacy and safety expectations.

Option 2: React Native and other cross-platform runtimes

Overview

React Native, Flutter, and similar runtimes aim to:

  • Share UI code across iOS, Android, web, and more.
  • Use a single layout engine and component model.
  • Provide bridges or embedding layers to access native capabilities.

React Native’s New Architecture (the default since RN 0.76) brings:

  • Concurrent React rendering.
  • Synchronous layout and effects.
  • Type‑safe native modules without the old bridge bottleneck.

Flutter compiles release builds to machine code and supports mobile, web, desktop, and embedded from one codebase.

Strengths for generative UI

These runtimes have real advantages:

  • Single schema across platforms: You can define one JSON layout model and render it on iOS/Android.
  • Mature ecosystems: Lots of existing JSON UI frameworks and component libraries.
  • LLM‑friendly: It’s straightforward to generate React/Flutter component trees in JSON, then render them.

You also get strong remote configuration patterns:

  • Meta’s MobileConfig shows that server-driven control over app behavior at massive scale is possible, even beyond UI.

Limitations for native iOS feel

However, if your priority is native SwiftUI interfaces and iOS fidelity, there are real compromises:

  • React Native docs still talk about JS‑thread saturation, dropped frames, and cases where you must manually optimize.
  • Flutter’s own platform view embedding docs highlight performance and fidelity tradeoffs when mixing Flutter with native views, and note potential accessibility issues.
  • Cross‑platform UI rarely looks exactly like native iOS, especially for subtle details (text rendering, scroll physics, animations).

For AI-generated UI, this means:

  • You may generate expressive screens quickly, but they won’t be truly SwiftUI.
  • Integrating with a heavily SwiftUI‑based app can be clumsy.
  • Your AI UX may feel like “a mini app inside the app” rather than the app itself.

React Native + LLMs: practical pattern

If you are already all‑in on React Native, the best pattern is:

  • Let the LLM generate component trees in JSON (e.g., Stack, Section, Button, etc.).
  • Use a server-driven UI renderer to turn those trees into RN views.
  • Validate schemas server-side to avoid arbitrary JS injection.

This is workable, but it’s still a cross-platform story, not a native SwiftUI story.

Tradeoffs

Cross‑platform runtimes are strongest when:

  • Your org has already standardized on RN/Flutter.
  • You want one AI interface layer serving multiple platforms.

They are weaker when:

  • You care deeply about native iOS feel.
  • Your app is primarily SwiftUI/UIKit and you want generative UI that plugs directly into that stack.

Option 3: Free-form LLM-to-code generation (SwiftUI, React, etc.)

Overview

This is the most tempting—and most dangerous—option:

  • Ask the LLM to write SwiftUI code.
  • Compile and run it.
  • Repeat until it looks okay.

Apple’s UICoder research directly addresses this pattern and finds:

  • LLMs struggle to generate UI code that compiles and looks good.
  • Automated feedback from compilers and multimodal models improves results, but reliability is still an issue.

Why this breaks down in production

Free-form code generation introduces several problems:

  • Safety: Executing arbitrary code generated by a model is extremely hard to sandbox on-device.
  • Review: App Store review and privacy manifests expect deterministic behavior and clear data flows.
  • Debuggability: When a layout breaks, it’s hard to trace back through prompts to understand why.

Given Apple’s tightening privacy and SDK rules, shipping a system where:

  • LLMs can emit arbitrary Swift or JS.
  • That code runs in the client.

…is increasingly incompatible with both security best practice and App Review expectations.

Where structured outputs change the game

The key shift in the broader AI ecosystem is toward structured outputs:

  • OpenAI’s Structured Outputs guarantee that model responses match your JSON Schema.
  • Function calling connects models to typed backend APIs.

For UI, this means:

  • Models should emit data, not code.
  • Your server should translate that data into your chosen UI framework (SwiftUI, RN, Flutter) under strict validation.

Uzori is built around exactly this principle:

  • AI composes flows using a constrained, server-approved schema.
  • The server validates and resolves those flows into SwiftUI views.
  • The client streams screens, never arbitrary code.

Tradeoffs

LLM-to-code is still useful as a developer tool:

  • Generating boilerplate SwiftUI components.
  • Prototyping variations of a screen in Xcode.

But as a runtime UX layer, it’s too unpredictable for most product teams.

Comparison table: native SwiftUI vs cross-platform vs free-form code

Here’s how the main options stack up for generative UI on iOS.

| Dimension | SwiftUI + SDUI (Uzori, DivKit, JSON UI) | React Native / Flutter runtimes | Free-form LLM-to-code (SwiftUI/RN) | |----------|-----------------------------------------|----------------------------------|------------------------------------| | Native iOS fidelity | High – uses real SwiftUI/UIKit components | Medium – close, but cross-platform controls and layout | Varies – can be native, but unstable and hard to constrain | | Performance | High – SwiftUI optimized for platform; SDUI adds minimal overhead | High but requires tuning – JS thread & embedding tradeoffs | Unclear – dependent on generated code quality | | AI integration pattern | Structured outputs + JSON schemas + server validation | Structured component trees + JSON + SDUI renderers | Free-form code generation with compiler feedback | | Safety & App Review alignment | Strong – no arbitrary remote code; easy to disclose data flows | Good if schemas are constrained; needs care around bridging | Weak – executing generated code complicates security & review | | Iteration speed on flows | Very high – “one screen to integrate, infinite flows” | High – single schema across platforms | Medium – every change is a code change; harder to A/B test | | Fit for AI-native SwiftUI apps | Excellent – the most aligned option | Moderate – better if your app is already RN/Flutter | Poor – better as an internal dev tool than runtime |

Uzori vs generic SDUI frameworks (e.g., DivKit)

If you’ve already experimented with server-driven UI iOS frameworks like DivKit, you might ask:

Why do I need a dedicated AI UI SDK like Uzori instead of just wiring an LLM into my existing SDUI system?

The short answer: Uzori is purpose-built for AI orchestration of native SwiftUI flows.

What generic SDUI frameworks provide

DivKit and similar JSON UI frameworks give you:

  • A schema for components (containers, lists, forms, animations).
  • A client renderer for iOS/Android/web.
  • A visual editor for non-engineers.

They’re battle‑tested and great for remote layout control.

What Uzori adds for AI-generated SwiftUI

Uzori focuses specifically on AI-native SwiftUI interfaces:

  • SwiftUI-first SDK: A single-screen view that drops into your existing navigation stack.
  • AI engine wired to your backend: Models see your OpenAPI schemas and can orchestrate flows across your APIs.
  • Server-side validation and streaming: Every AI-composed screen is checked on your server before being streamed into the app.

This gives iOS teams:

  • Generative UI, server-driven safety. AI composes; your server validates.
  • Task-specific, conversational UX. Instead of chat, users get wizards, comparison views, product explorers—all native.
  • Minimal client footprint. Different AI flows share the same SwiftUI integration point.

Uzori vs DivKit: when to choose which

Pick DivKit or similar SDUI if:

  • You primarily want structured, non-AI server-driven layouts.
  • You’re focused on classic A/B testing and remote config.

Pick Uzori if:

  • You’re building AI concierges, guided setup flows, or complex explainer UX.
  • You want LLMs to design screens and flows using your own backend and data.
  • You care that everything stays native SwiftUI and schema-validated.

Recommendation by use case

Use case 1: Native iOS app, SwiftUI-heavy, adding an AI concierge

Best option:

  • SwiftUI + Uzori (or similar AI-aware SDUI layer).

Why:

  • Highest native fidelity.
  • Best integration with OpenAPI and structured outputs.
  • Clear privacy and safety story.

Use case 2: Cross-platform product (iOS + Android) already on RN/Flutter

Best option:

  • React Native or Flutter with a JSON-based generative UI layer.

Why:

  • Reuse schemas and components across platforms.
  • One AI interface layer for both iOS and Android.

Caveat:

  • You won’t get true SwiftUI interfaces; your iOS UX will be cross-platform.

Use case 3: Internal tools, prototypes, or dev-only experiments

Best option:

  • Free-form LLM-to-code generation for SwiftUI or RN, behind feature flags.

Why:

  • Fast for prototyping ideas.
  • Helpful as a developer productivity boost.

Caveat:

  • Avoid shipping this pattern to production users without strong sandboxing and validation.

How Uzori fits your stack

For iOS teams considering Uzori, the integration story is intentionally simple:

  • Drop a single SwiftUI screen into your app.
  • Describe your backend APIs via OpenAPI.
  • Configure your schema for generative UI components.

From there, Uzori can:

  • Take user requests and context data.
  • Call your backend APIs as tools/functions.
  • Stream validated SwiftUI screens directly into your app.

You keep:

  • Existing navigation and state management patterns.
  • Your design system and component library.
  • Full control over what AI can and cannot generate.

FAQ: generative UI for native iOS

Q1: What is the safest way to generate UI from LLM responses for iOS?

The safest pattern is schema-constrained generation with server-side validation.

Models emit JSON that matches a strict UI schema; your server validates and translates that into SwiftUI views.

This avoids arbitrary remote code execution and aligns with Apple’s privacy and review expectations.

Q2: Why not just let the LLM write SwiftUI code directly?

Apple’s UICoder research shows that LLM-generated UI code often fails to compile or looks wrong without heavy feedback loops.

More importantly, running generated code on-device creates security and review risks.

Structured data plus SDUI is much easier to constrain, test, and audit.

Q3: Is React Native or Flutter a bad choice for AI-generated interfaces?

Not necessarily.

If your app is already on RN or Flutter, using those runtimes with a JSON UI layer can be a good way to generate cross‑platform screens.

However, if your priority is native SwiftUI interfaces and iOS-first UX, a SwiftUI + SDUI approach (like Uzori) will feel more integrated and performant.

Q4: How does Uzori handle privacy and third-party AI data sharing?

Uzori is designed around server-side validation and clear data contracts.

You control:

  • What user data is sent to AI models.
  • Which third-party AI services are used.
  • How flows are logged and audited.

This makes it easier to comply with Apple’s updated App Review guidelines on third-party AI data sharing and privacy manifests.

Q5: Can I start with one small flow and expand later?

Yes.

Uzori is intentionally “one screen to integrate, infinite flows to explore.”

Most teams start with a single assistant-like feature (e.g., an AI concierge or guided setup) behind a feature flag, then expand to more flows once they see the impact on UX and iteration speed.

If you’re serious about building AI-native iOS experiences that feel like your app—not someone else’s chatbot—the strongest path today is:

  • SwiftUI as your native baseline.
  • Schema-constrained, server-driven UI.
  • An AI interface layer like Uzori that turns answers into operable, native screens.
← All posts