Hootsuite Ryan Samarajeewa Jul 6, 2023

From Hacking to Shipping: Kotlin Multiplatform Mobile at Hootsuite

Article Summary

Hootsuite's mobile team shipped a major product rewrite using Kotlin Multiplatform Mobile—sharing business logic across iOS and Android while keeping native UIs. Here's how they went from hackathon experiment to production.

The team rebuilt their Inbox feature from scratch, sharing domain and data layers between platforms for the first time. This detailed retrospective covers their architecture decisions, technical challenges, and lessons learned from adopting KMM in mature native apps.

Key Takeaways

Critical Insight

Hootsuite successfully adopted KMM for a major feature rewrite, sharing business logic across platforms while maintaining fully native UIs and developer experience.

Their manual dependency injection approach and workarounds for sealed classes reveal practical patterns you won't find in official KMM docs.

About This Article

Problem

Hootsuite's iOS and Android teams needed to share business logic across platforms. They wanted to avoid migrating to a monorepo while keeping their separate, mature native codebases intact. iOS developers also needed a way to consume compiled Kotlin binaries.

Solution

The team linked the iOS repository to the Android repository using a Git submodule. They exported shared Kotlin code as an XCFramework with the multiplatform Gradle plugin. Custom scripts automated binary updates so developers could work locally without friction.

Impact

In May 2023, the team shipped the production Inbox feature with shared domain and data layers on both platforms. This eliminated code duplication while keeping native UI and developer experience unchanged. They accomplished this without moving to a monorepo.