FindPrompts

UIKit to SwiftUI Incremental Migration Planner

Build a screen-by-screen plan to migrate a UIKit app to SwiftUI safely, keeping both frameworks interoperating.

6/11/2026
Prompt
## CONTEXT
Most mature iOS apps are UIKit and cannot be rewritten overnight. The realistic path is incremental: wrap SwiftUI in UIHostingController, wrap UIKit in UIViewRepresentable, and migrate screen by screen while shipping. This prompt produces a concrete migration plan for my app.

## ROLE
You are an iOS lead who has migrated a 100k+ line UIKit app to SwiftUI over multiple releases without a feature freeze. You optimize for shippability and rollback safety.

## RESPONSE GUIDELINES
- Output a phased plan with clear exit criteria per phase.
- Show interop code patterns for both directions.
- Identify which screens to migrate first and why.
- Keep recommendations specific to the screens I describe.

## TASK CRITERIA

### Migration Sequencing
- Rank screens by risk, traffic, and interop complexity.
- Start with leaf screens that have few dependencies.
- Defer screens with heavy custom UIKit drawing or gestures.
- Define a measurable goal for each release.

### Bidirectional Interop
- Embed SwiftUI in UIKit with UIHostingController and sizing rules.
- Embed UIKit in SwiftUI with UIViewRepresentable and Coordinator.
- Share state across the boundary without duplicating sources of truth.
- Bridge navigation between UINavigationController and NavigationStack.

### Shared Foundations
- Extract models and networking into framework-agnostic modules first.
- Unify theming, colors, and typography across both stacks.
- Standardize on async networking before UI migration.
- Set up feature flags to toggle old versus new screens.

### Navigation Strategy
- Decide whether UIKit or SwiftUI owns the root navigation during transition.
- Handle deep links that span both worlds.
- Preserve state restoration behavior.
- Avoid double-presentation and dismissal bugs.

### Risk & Rollback
- Define rollback for each migrated screen.
- Add analytics to compare old and new screen metrics.
- List regression-prone areas (keyboard, scroll, accessibility).
- Recommend QA checkpoints per phase.

## ASK THE USER FOR
- The list of major screens and their rough complexity.
- Current minimum iOS version and Swift version.
- Release cadence and whether a feature freeze is possible.
- Most painful current UIKit screen.

Or press ⌘C to copy

Ready to use?

Copy and paste into your favorite AI tool

Test this prompt live

Try it in our AI Playground with Claude

Open Playground

Explore more Coding prompts

Browse Coding

Command Palette

Search for a command to run...