Cross-platform development fascinates because of its many nuances. Is it more important than an app works the same on each platform, or that it is optimized for the best experience? Is it more important to share code for better maintainability, or to have separate code bases to avoid compromising? And if one does go the for a cross-platform framework, what is the best choice?
Back in 2020, Shopify decided on React Native as its solution; now it is changed its mind. The company has several mobile apps, including one called Shopify aimed at vendors using its service, and another called Shop aimed at consumers. Shop has a five-star rating and is the 7th most popular shopping app in the iOS App Store.
When it adopted React Native after “years of native mobile development”, the company cited three reasons: acquisition of another company with deep React Native skills (Tictail); harmony with its use of React in its web applications; and the improving performance of the React Native framework. Shopify said that an early rewrite of Shop (formerly called Arrive) had less crashes on iOS than the native version, and shared 95% of code with the Android version.
Now, Shopify engineers say that “advances in coding agents changed the tradeoffs behind maintaining a shared mobile codebase.” The native port of Shop, now using Swift on iOS and Kotlin on Android, has a faster start-up (23% improvement on iOS, 50% on Android), improved stability, and on Android, 37% smaller release build size.
React Native has a new architecture with many improvements; however migration to this has challenges and avoiding this work for its Shop app was another factor in Shopify’s decision – though it had already migrated two other apps. This also means that Shopify’s comparisons are with the old React Native architecture; one might speculate that migrating to the new architecture would also have brought benefits. That said, its report on migrating the other apps (Shopify Mobile and Shopify Point of Sale) was mixed; start-up time slightly improved, but the team discovered performance and stability issues which required work. “These were not to blame on the New Architecture itself. It just revealed cracks in some component designs that were previously invisible,” said Shopify at the time.
The key point of interest is not so much the change of mind but the role of AI coding in the decision. The company said that “Native still means building and maintaining software on two platforms, that cost has not disappeared. What changed is that agents can now do enough of the implementation, translation, testing, and review work that it’s no longer the deciding factor it was in 2020.”
What works for Shopify may not work so well elsewhere. Personally I am nervous about AI coding for several reasons, including cost, security and subtle bugs. As an individual developer, the notion of paying continually for software development is unattractive; that does not apply to a larger company which asks only whether the benefits exceed the costs.