Skip to main content
All posts
$less posts/kmp-shared-logic-without-shared-ui.txt
posts/kmp-shared-logic-without-shared-ui.txt0 min

KMP: Shared Logic Without Shared UI

author Nikita Pochaevdate Feb 2026category Architecture

When we started our Kotlin Multiplatform project, the temptation was to share everything — including UI. We resisted that urge, and it turned out to be the right call.

The approach

Our shared module handles three things: networking (Ktor), local caching (SQLDelight), and domain logic. Everything above that layer is platform-native.

On Android, we use Jetpack Compose. On iOS, SwiftUI. The shared Kotlin code compiles to a framework that iOS consumes directly.

Why not share UI?

Compose Multiplatform is impressive, but our iOS users expect iOS-native behavior. Swipe-back navigation, platform haptics, accessibility patterns — these are hard to replicate in a cross-platform UI layer.

Results

  • 60% code sharing by line count
  • Native feel on both platforms
  • One team maintaining shared logic
  • Platform teams focus on UI polish

The key insight: share the boring parts (networking, caching, business rules) and let each platform shine where it matters most.

#KMP#Architecture
up 47d 6h 23mload 1.47 1.22 0.98tasks 406thr 1,247mem 37%
interactive shell -- try: help, ls posts/, cat meridian, open blog, neofetch
po4yka@ghostty:~$

© Nikita Pochaev · built with ghostty vibes