Home / Insights / Mobile App Development

Mobile App Development

Modernising an Older Native App: Moving to SwiftUI and Jetpack Compose without a Rewrite

Most older native apps do not need a rewrite. They need a migration plan that moves screens to SwiftUI and Jetpack Compose in a safe order, while the app keeps shipping.

TopicsMobile App DevelopmentArchitecture and Modernization

Key takeaways

  • Assess the app before choosing an approach: UI layer, architecture, dependencies, test coverage and store compliance are separate problems.
  • Incremental migration works because SwiftUI interoperates with UIKit and Compose interoperates with Android Views, so old and new screens can coexist.
  • Migrate new features first, then simple static screens, then the complex flows that carry most revenue or risk.
  • A rewrite is justified only when the architecture blocks every change, not because the code is old or unfamiliar.
  • Protect each step with UI and regression tests on the critical journeys, and release behind feature flags where possible.

Native apps age in a particular way. The code still compiles, the app still sells, but every change takes longer than it should. Layouts built in storyboards or XML resist new designs, dependencies stop receiving updates, and each annual iOS and Android release adds a little more work. At some point a product owner asks whether it is time to start again.

In our experience the honest answer is usually “not yet”. Apple and Google have both designed their modern UI frameworks, SwiftUI and Jetpack Compose, to sit alongside the older toolkits. That makes it possible to modernise one screen at a time while the app stays in the stores. This article sets out how to assess an older native app, the order in which to migrate, what to test, and the specific signs that a rewrite really is the better option.

Assess the app before you choose an approach

“Modernisation” covers several different problems. Separating them stops a team from fixing the visible one (old-looking screens) while the expensive one (a tangled data layer) stays in place. A short technical review should look at each layer on its own.

LayerWhat to checkTypical warning signs
UIStoryboards, XIBs or XML layouts; custom views; navigation approachMassive view controllers or activities; layouts nobody wants to touch
ArchitectureSeparation between UI, business logic and data; state handlingNetwork calls and business rules inside screens; global singletons
DependenciesThird-party SDKs and libraries, their maintenance status and licencesAbandoned libraries; SDKs pinned to old versions because upgrades break builds
Build and releaseBuild tooling, signing, CI, release automationManual builds on one person’s machine; undocumented signing certificates
TestsUnit, UI and regression coverage of critical journeysNo automated tests; manual regression that takes days
Store complianceMinimum OS versions, target SDK level, privacy declarationsWarnings in App Store Connect or Play Console; upcoming deadlines

The output of this review is a short list of problems ranked by business impact. For a broader approach to inheriting unfamiliar code, our checklist for taking over an inherited codebase covers access, documentation and risk in more detail.

Why incremental migration usually beats a rewrite

On Android, Google’s guidance is explicit: Compose and Views can coexist, and the recommended path is incremental. A ComposeView lets you host Compose UI inside an existing Fragment or layout, and AndroidView lets you embed an existing View inside a composable. On iOS, UIHostingController places a SwiftUI view inside a UIKit hierarchy, and UIViewRepresentable wraps a UIKit view for use in SwiftUI.

That two-way interoperability changes the economics:

  • The app keeps shipping. Users and the business do not wait months for a parallel app to reach feature parity.
  • Risk is spread out. Each migrated screen is a small, reviewable change that can be tested and rolled back.
  • Hidden behaviour survives. Old apps contain years of edge-case fixes that nobody documented. A rewrite has to rediscover them; a migration keeps them in the business logic you are not touching.
  • The team learns as it goes. Conventions for state, theming and navigation in the new framework get settled on low-risk screens first.

The trade-off is a period, sometimes long, where two UI approaches coexist. That needs discipline: a clear rule that new work uses the new framework, and a visible list of what remains.

A migration order that keeps risk low

Google’s Compose migration strategy recommends three steps, and the same order works well for SwiftUI.

  1. Build new screens in the new framework. Every new feature written in SwiftUI or Compose is code you never have to migrate later.
  2. Build a shared component library. As you go, extract buttons, inputs, cards and typography into reusable components. This becomes the design system for both the old and new parts of the app.
  3. Replace existing screens one at a time. Start with simple, mostly static screens such as settings, onboarding or confirmation pages, then move to complex, high-traffic flows once the team and the component library are mature.

Fix the architecture where it blocks you

The UI framework is rarely the only obstacle. SwiftUI and Compose both expect state to come from somewhere outside the view, typically a view model. If business logic lives inside view controllers or activities, move it out first, screen by screen. This is often the slowest part of the work and the most valuable, because it also makes the logic testable.

Leave navigation until late

Navigation touches every screen. Android’s guidance suggests keeping Fragment-based navigation until all Fragments have been replaced, and only then moving to Navigation Compose. On iOS, a coordinator or router pattern can host both UIKit and SwiftUI screens during the transition.

Testing and releasing during the transition

Migration changes how a screen is built without intending to change what it does. That makes regression testing the main safety net.

  • Write UI tests for critical journeys before migrating them. Sign-in, checkout, booking or any flow that carries revenue should have automated checks that pass on the old screen and the new one.
  • Compare screenshots. Snapshot tests catch spacing, font and colour drift that functional tests miss.
  • Check accessibility explicitly. Labels, dynamic type and focus order behave differently in the new frameworks and are easy to lose.
  • Measure performance. Long lists, heavy animation and complex layouts can behave differently after migration. Profile on real low-end devices, not just simulators; our article on finding mobile app performance problems covers the method.
  • Release behind flags where you can. Shipping the new screen dark, then enabling it for a share of users, gives a rollback path that does not depend on store review.

When a rewrite really is the better option

Incremental migration is the default, not a rule. A rewrite deserves serious consideration when several of these are true at once:

  • The architecture prevents almost any change from being made safely, and untangling it would touch most of the code anyway.
  • The product itself is changing substantially, so most existing screens and flows will be replaced regardless.
  • Critical dependencies are abandoned and have no maintained replacement that fits the current structure.
  • The app is small enough that rebuilding it costs less than the transition period would.
  • You are also reconsidering the platform choice. If the requirements no longer need native, see native or cross-platform: how to choose before committing.

If you do rewrite, treat the old app as the specification. Inventory every screen, rule and integration before writing code, and plan a cutover with data migration and a rollback position.

What drives the effort

We do not quote modernisation work from the outside, because the effort depends on what the assessment finds. The main drivers are predictable, though:

DriverWhy it matters
Number and complexity of screensStatic screens migrate quickly; custom-drawn or gesture-heavy screens do not
Where business logic livesLogic inside screens must be extracted before the UI can change
Test coverage at the startMissing tests must be written before migration can be done safely
Dependency healthReplacing abandoned SDKs can be a project of its own
Both platforms or oneTwo native codebases usually need separate migration plans, even with a shared design system
Feature work in parallelMost teams keep shipping features; the plan has to share capacity

Modernisation also changes the ongoing maintenance profile. Our guide to software maintenance costs after launch explains how to budget for the years after the migration.

If you are weighing up a modernisation, PoliteTech’s native mobile development team usually starts with a technical requirements review that produces the ranked problem list described above.

Frequently asked questions

Can SwiftUI and UIKit screens exist in the same app?

Yes. UIHostingController hosts SwiftUI inside UIKit, and UIViewRepresentable wraps UIKit views for SwiftUI. Most modernised apps run both for a period.

Can we migrate an Android app to Compose one screen at a time?

Yes. Google recommends exactly that: build new screens in Compose, create a shared component library, then replace existing screens, starting with simple ones. ComposeView and AndroidView handle interoperability.

Should we raise the minimum OS version as part of modernisation?

Often, because newer framework features depend on newer OS versions. Check your analytics for how many active users are on older versions before deciding, and communicate the change in release notes.

How do we stop the migration dragging on forever?

Keep a visible list of unmigrated screens, require new work to use the new framework, and reserve a fixed share of each sprint for migration rather than doing it only when time allows.

Sources and methodology

Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.

  1. Android Developers: Migration strategy, Jetpack Compose — Supported the three-step incremental migration order and the advice to move to Navigation Compose only after Fragments are replaced.
  2. Android Developers: Migrate XML Views to Jetpack Compose — Supported the point that Compose and Views interoperate via ComposeView and AndroidView.

Is your native app ready for SwiftUI and Compose?

We can review your app’s UI, architecture, dependencies and tests, then propose a migration order that keeps the app shipping.