We migrated the Shop app from React Native to Swift and Kotlin, going from proof-of-concept to publishing in 12 weeks with the help of AI.
Shopify rebuilt its massive React Native app into two separate native iOS and Android apps in just 12 weeks, cutting crash rates by 10x and Android startup times by 50%. 👇
Maintaining a single cross-platform codebase is supposed to save engineering hours. But when Shopify faced a major refactor to adopt React Native's New Architecture—requiring heavy rewrites of native modules, rendering, and platform boundaries—they paused. They realized AI coding agents had shifted the economics of maintaining separate native codebases, making a full native rewrite faster than upgrading their cross-platform framework.
Shopify abandoned React Native entirely, migrating the Shop app to native Swift and Kotlin using SwiftUI and Jetpack Compose.
To pull off the rewrite in three months, a core team of six engineers turned AI coding agents into structured translation engines. Instead of writing code by hand, engineers ran multiple agent sessions in parallel across separate git worktrees using a custom workflow built on the Pi coding agent.
Specialized subagents first audited the existing React Native codebase, mapping out UI layouts, navigation, state, accessibility, and analytics hooks. Next, they generated platform implementation plans for iOS and Android. Human engineers reviewed every plan before work began. To prevent agents from going rogue, plan approval was bound to a hash of the file contents—if an agent modified a plan during execution, its approval was automatically invalidated.
Once approved, agents scaffolded screens, wired up data, and translated logic. But agents needed feedback from a live app to fix UI bugs. Shopify built Tardis, a custom internal debugger that gave agents structured access to native app logs, events, and state. Tardis allowed agents to send commands to the running app, capture screenshots, and inspect event windows, letting them self-correct layout and navigation bugs automatically.
The result was a completely native app shipped to production in 12 weeks. Cold start times dropped 23% on iOS (from 3200 ms down to 2466 ms) and 50% on Android (from 4433 ms down to 2233 ms). Android release build sizes shrank by 109 MB—a 37% drop—and Android build times fell by 75%. Session stability rose from 99.5% to over 99.95%, representing a 10x drop in crashing sessions while achieving smooth 120 FPS scrolling.
NayaRead shows a summary and links to the original article. The full article is hosted on shopify.engineering.