Building SwiftUI Apps with Claude Code and Cursor That Don't Look AI-Generated
AI coding agents are now genuinely good at SwiftUI. Claude Code, Cursor and Codex can scaffold an app, wire up SwiftData and write a working settings screen in minutes. What they're not good at, left alone, is making the result look like your app instead of a template. This is the workflow we use to get both: speed from the agent, and screens that look designed.
1. Set up the project so the agent can work
Agents do their best work when they can build and check their own output.
- Let it build from the command line. Add the exact build command to your agent instructions (
CLAUDE.md,AGENTS.mdor Cursor rules), for examplexcodebuild -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 17' build. An agent that sees compiler errors fixes them; one that can't, guesses. - Keep files small. One screen per file, one concern per type. Agents edit small files reliably and large ones badly.
- State your platform floor. "iOS 26, SwiftUI only, no UIKit unless asked, no third-party packages" prevents a lot of wandering.
- Pick your concurrency defaults. With Swift 6.2's main-actor-by-default isolation, agents stop sprinkling
@MainActorandTaskwrappers everywhere.
2. Give it a design system before the first screen
This is the step that makes the difference. Without one, every prompt is a fresh design guess, and the guesses drift. With one, every screen comes from the same rules.
- A DESIGN.md in the repo with tokens and rules (what goes in one).
- A
Theme.swiftthat turns those tokens into SwiftUI (how to build it). - A few reference screens in the style, because agents imitate examples better than they follow rules.
- One line in your agent instructions: "Read DESIGN.md before writing any UI. Use Theme.swift for every color, font, spacing value and shared component."
In Claude Code, package these as a skill, so they load automatically whenever the agent builds UI.
3. Build one screen at a time
Big prompts ("build the whole app") produce big, generic results. Small, concrete ones produce good screens:
Build the paywall: monthly and yearly plans with yearly preselected, the yearly price per month underneath, a restore purchases link and a close button. Follow DESIGN.md. Use StoreKit's
SubscriptionStoreViewonly if it can match our style; otherwise build it from Theme components.
Then iterate on what you see, in the design system's vocabulary: "the plan cards should use surfaceRaised and hairline rules, not shadows" beats "make it look nicer".
4. Review in the simulator, in both appearances
Agents can't see their screens unless you let them. After each screen:
- Run it in the simulator in light and dark mode and at a large Dynamic Type size.
- Ask the agent to compare the screen against DESIGN.md's do's and don'ts and list what's off before fixing anything.
- Take a screenshot and give it back to the agent when something looks wrong. Multimodal models are good at spotting misalignment in a picture they'd never notice in code.
5. Keep the design system the source of truth
When you change your mind about the design, change DESIGN.md and Theme.swift first, then ask the agent to bring the screens in line. Fixing screens one by one brings the drift back.
Common failure modes and fixes
| What you see | Usually because | Fix |
|---|---|---|
| Every app looks the same (system blue, default list) | No design system | Add DESIGN.md and Theme.swift |
| Random gradients and shadows | Model "making it nicer" | Add explicit don'ts |
| Inconsistent spacing | No closed spacing scale | Spacing tokens only; ban raw numbers |
| Broken dark mode | Hard-coded colors | Adaptive color tokens |
| Huge files, broken edits | One-shot prompts | One screen per prompt and file |
Start with a design system that's already done
Writing the design system is the part that needs a designer. Effect UI's styles are finished, original design systems for iOS, each with a DESIGN.md, a Claude Code skill, a Theme.swift and five reference screens, tested by generating and compiling real apps with AI. Drop one into your project and keep prompting. Ledger is free.