The Not-So-Hidden Cost of Sharing Code Between iOS and Android
Article Summary
Eyal Guthmann from Dropbox shares a hard truth: writing code once in C++ cost them more than writing it twice in native languages. Here's why their cross-platform strategy backfired.
Back in 2013, Dropbox adopted C++ to share code between iOS and Android with a small mobile team. By 2019, they completely abandoned the strategy in favor of Swift and Kotlin. The overhead of maintaining a custom stack outweighed the benefits of writing code once.
Key Takeaways
- Custom frameworks like Djinni were needed just to interact with native platforms
- Debugging multi-threaded C++ bugs took weeks versus days in native code
- Platform differences meant code still required extensive platform-specific work
- Couldn't hire senior C++ mobile engineers after original team left
- Mobile developers left the project rather than work on custom C++ stack
Critical Insight
The overhead of custom tooling, hiring challenges, and platform differences made writing code twice in native languages cheaper than writing it once in C++.