Skip to content
Derar Sattouf

Kotlin Multiplatform vs Flutter vs Native SwiftUI and Compose in 2026

Updated Mobile

Kotlin Multiplatform vs Flutter vs Native SwiftUI and Compose in 2026

Every mobile team eventually has the same meeting. Somebody asks whether we should write the app once, or write it twice, or write the interesting parts once and the screens twice. The answer is never a framework name. It is a function of who is on the team, what the product actually does, how long it needs to live, and which kind of pain the organisation is willing to tolerate.

By late 2026 the options have settled down, though the choice is more nuanced than it was three years ago. Kotlin Multiplatform (KMP) is a mainstream way to share business logic, and Compose Multiplatform for iOS has been stable since the 1.8.0 release in May 2025. Flutter keeps shipping on a regular cadence and has made Impeller its renderer across platforms. React Native has its New Architecture. SwiftUI and Jetpack Compose are both mature declarative toolkits with a decade of combined lessons behind them. None of these options is a mistake. Each is a mistake for some team.

There are five real options: fully native (SwiftUI plus Jetpack Compose), KMP with native UI, KMP with Compose Multiplatform UI, Flutter, and React Native. React Native gets a short section because most of its trade-offs mirror Flutter's, with a JavaScript and TypeScript talent pool instead.

My default is to share logic, not pixels. KMP with native UI gives the lowest long-term risk: your UI stays platform-native and you can stop using KMP without rewriting screens. Share networking, persistence, domain rules and validation first.

Choose Flutter when you need one UI codebase with pixel-level brand control, your team is small, and you accept a rendering engine that isn't the platform's. It's excellent for design-led consumer apps and internal tools. Choose Compose Multiplatform when your team already writes Kotlin and Compose on Android and you want one UI codebase without leaving that ecosystem, and plan for iOS-specific polish work. Choose fully native when platform features are the product: deep widget and Live Activity work, camera pipelines, AR, accessibility-critical apps, or when you have two strong platform teams anyway.

Don't decide from benchmarks on a blog. Run a two-week proof of concept that builds one hard vertical slice on each finalist, measure it on mid-range physical devices, and decide with data (the plan is near the end of this post). Hiring and exit cost matter more than raw performance in nearly every business, so ask what it costs to leave each choice in year four.

Version numbers move quickly, so where a specific version, flag or API surface matters, check it against the current documentation instead of trusting any article, this one included.

The decision framework

If you're recommending a stack to someone else, don't hand over a single framework name. Collect these inputs first: team skills (Kotlin, Swift, Dart, TypeScript headcount), product type, platform-feature intensity, target OS versions, design-system rigidity, expected lifetime, and whether a web or desktop target is required. Then map them through the tables below and report the recommendation with the two strongest counter-arguments and a plan to falsify the choice cheaply.

Start with four questions, in this order. The order matters because each question can eliminate options before you spend time debating the next.

  1. What is the product's centre of gravity? If the value is in platform integration (widgets, watch apps, CarPlay, background audio, on-device ML, system share extensions), native or KMP-with-native-UI wins, because you will write platform code regardless. If the value is in content, forms, feeds and workflows, any option works.
  2. Who is on the team today? The best framework is usually the one your existing engineers already know, adjusted for what you can realistically hire in your market.
  3. How strict is the design? A strict, custom, brand-first design system with its own motion language favours Flutter or Compose Multiplatform, which draw their own pixels. An app that must look and feel like each platform, including new system design languages, favours native UI.
  4. How long will it live, and how much will you pay to change your mind? Choices that are reversible in pieces beat choices that are all-or-nothing.

Decision table by team shape

Team shapeFirst choiceSecond choiceAvoid
1 to 3 engineers, no mobile specialists, web backgroundReact Native or FlutterCompose Multiplatform if Kotlin-fluentTwo fully native apps
3 to 8 engineers, Android-heavy, some iOSKMP with native UI, or Compose MultiplatformFlutterMaintaining two divergent business-logic codebases
Dedicated iOS and Android teams (4+ each)KMP shared logic with native UIFully native with shared API contractsForcing one UI toolkit on both teams
Startup validating a product, deadline in weeksFlutter or React NativeCompose MultiplatformPremature architecture for a shared core
Enterprise with long-lived app and compliance requirementsKMP shared logic, native UIFully nativeAnything you cannot audit or exit from
Design-led consumer brand app with heavy custom animationFlutterCompose MultiplatformFully native if the team is tiny
Apps dominated by platform features (widgets, watch, AR, camera)Fully nativeKMP with native UICross-platform UI layers that lag new OS APIs

Decision table by product type

ProductWhyRecommended
Banking, health, regulated appsAccessibility, platform security APIs, auditsNative UI plus optional KMP core
E-commerce and marketplacesMany screens, A/B tests, fast iterationFlutter, React Native, or KMP plus native UI
Media and socialHeavy platform media stack, gestures, feed performanceNative, or KMP plus native UI
Field service and internal toolsMany forms, offline sync, small teamFlutter or Compose Multiplatform
Fintech with trading chartsCustom rendering and high frame rateNative or Flutter (custom painting)
Companion apps for hardwareBluetooth, background execution, OS quirksNative or KMP plus native UI
Games or interactive 3DNot this guide; use a game engineUnity, Godot or similar

The decision tree as text

Is the app mostly platform-integration (widgets, watch, AR, camera, CarPlay)?
├── Yes -> Native UI. Share only logic if two teams exist -> KMP core (see the KMP with native UI architecture)
└── No
    ├── Is brand-level custom UI more important than platform look and feel?
    │   ├── Yes
    │   │   ├── Team knows Kotlin/Compose -> Compose Multiplatform (see its architecture section)
    │   │   ├── Team knows Dart or is greenfield -> Flutter (see its architecture section)
    │   │   └── Team is TypeScript/React -> React Native (see the React Native section)
    │   └── No (platform feel matters)
    │       ├── Have two platform teams -> KMP core + SwiftUI + Compose (see the KMP with native UI architecture)
    │       └── Have one small team -> Flutter or Compose Multiplatform, accept some uncanny-valley
    └── Do you also need web and desktop from the same UI code?
        └── Yes -> Flutter, Compose Multiplatform (web is newer, verify maturity), or React Native + web

What each option actually is

Marketing names blur the architecture. Be precise about what runs where.

Fully native

Two apps. iOS in Swift with SwiftUI (UIKit where needed), Android in Kotlin with Jetpack Compose (Views where needed). Two codebases, two release trains, two sets of dependencies. Everything platform-specific is first-class and day-one available. The cost is duplicated business logic and the constant risk that the two apps drift apart in behaviour.

Kotlin Multiplatform with native UI

Kotlin compiles to JVM bytecode for Android and to a native binary (via Kotlin/Native) for iOS. You write a shared module with networking, persistence, domain logic, and view-state production. The iOS side consumes it as a framework, typically an XCFramework distributed through Swift Package Manager or CocoaPods; the Android side consumes it as an ordinary module. UI is SwiftUI on iOS and Compose on Android. This is the lowest-regret way to share code.

┌──────────────────────────────────────────────────────────────┐
│                      Shared Kotlin module                    │
│  domain models · use cases · repositories · Ktor · SQLDelight │
│  view-state producers (StateFlow) · validation · formatting   │
└───────────────┬──────────────────────────────┬───────────────┘
                │ JVM bytecode                  │ Kotlin/Native
        ┌───────▼───────┐               ┌───────▼────────┐
        │ Android app   │               │ iOS app        │
        │ Jetpack       │               │ SwiftUI        │
        │ Compose UI    │               │ + Shared.xcfw  │
        └───────────────┘               └────────────────┘

Compose Multiplatform

Compose Multiplatform extends the Jetpack Compose programming model to iOS, desktop and web. On iOS it renders with Skia through a canvas inside a native view controller, so it draws its own pixels like Flutter does, while using your Kotlin code and Compose APIs. Interop is available both ways: you can embed native UIKit views (and SwiftUI through a hosting controller) in Compose, and embed a Compose view controller in a native iOS app. iOS support was declared stable in 1.8.0 (May 2025). Check the official compatibility and versioning page for the current stable release, minimum iOS version and required Kotlin version before pinning anything.

Flutter

A Dart codebase and a rendering engine. Flutter does not use platform widgets; it draws everything through Impeller, the engine's renderer. Platform channels, FFI and plugins reach native APIs. One UI codebase for iOS, Android, web, Windows, macOS and Linux with varying maturity per target. Recent releases have been separating the Material and Cupertino libraries into standalone packages and making Swift Package Manager the default on iOS; verify the exact state in the current release notes for your version.

React Native, briefly

A TypeScript and React codebase using a JavaScript runtime (Hermes) that drives real native views through the New Architecture (JSI, Fabric, TurboModules). Because it renders real platform controls, it gets some of the platform's look and accessibility for free, and it has the largest hiring pool because web developers can contribute. The trade-offs are a heavier dependency graph, native-module upgrade chores at each React Native release, and more places where JavaScript and native threads must coordinate. Expo has become the default entry point for most new projects; verify current guidance in the React Native docs.

Comparison matrix

The table below summarises the dimensions that most often decide the question. Treat entries as tendencies, not measurements; the proof-of-concept plan near the end shows how to measure for your app.

DimensionNativeKMP + native UICompose MultiplatformFlutterReact Native
UI code shared0%0% (logic only)Up to about 90%Up to about 95%Up to about 90%
Business logic shared0%60 to 90% typicalSameSameSame
Day-one access to new OS UI featuresYesYesDelayed, needs interopDelayed, needs plugin or channelDelayed, native module
Look and feelPlatform-nativePlatform-nativeCustom, themedCustom, themedMostly platform controls
Accessibility (VoiceOver, TalkBack)BestBestGood, needs auditingGood, needs auditingGood
Hot reloadPreviews, partialNative toolingCompose hot reload tooling (verify)Excellent, statefulFast Refresh
Binary size overheadBaselineSmall (shared framework)Larger (engine plus resources)Larger (engine)Moderate (runtime)
Startup timeBestNear nativeNear native with caveatsGood, engine init costGood with Hermes
Hiring poolLarge, two skill setsKotlin plus SwiftKotlinSmaller, DartLargest, JS and TS
Exit costn/aLowMediumHighHigh
Platform-specific codeAllUI onlyInterop where neededPlugins and channelsNative modules

Two caveats about this matrix. First, "binary size overhead" is real and measurable; for a typical app, Flutter and Compose Multiplatform add a few megabytes to the install for the engine and bundled resources compared with native. Whether that matters depends on your market and download-size sensitivity. Measure it on your build. Second, "performance" is mostly a function of how you write the app. A badly written native list stutters; a well written Flutter list does not. The more honest difference is where the cliffs are: Flutter's cliff is plugin and platform-view interop; Compose Multiplatform's is iOS text input and system integration polish; React Native's is the JavaScript to native bridge under load; native's is the cost of doing everything twice.

Architecture: KMP with native UI

This is the architecture I'd start with for most teams, so it gets the most detail. The principle is the dependency rule: the shared module knows nothing about SwiftUI or Compose. It exposes state and accepts intents, and each UI renders the state in its own idiom.

Project layout

app/
├── androidApp/                 # Android application module, Compose UI
│   └── src/main/kotlin/...
├── iosApp/                     # Xcode project, SwiftUI
│   └── iosApp/...
├── shared/                     # Kotlin Multiplatform module
│   ├── build.gradle.kts
│   └── src/
│       ├── commonMain/kotlin/  # domain, data, presentation (StateFlow)
│       ├── commonTest/kotlin/
│       ├── androidMain/kotlin/ # actuals: Android database driver, etc.
│       └── iosMain/kotlin/     # actuals: iOS database driver, etc.
├── gradle/libs.versions.toml
└── settings.gradle.kts

Gradle configuration

This is a representative shared/build.gradle.kts. Coordinates are real; the versions in the version catalog are placeholders, so look up the current releases of Kotlin, Ktor, SQLDelight and the kotlinx libraries. The Android library plugin used for KMP modules has also changed across Android Gradle Plugin releases, so use the plugin id that the current KMP documentation recommends.

plugins {
    alias(libs.plugins.kotlinMultiplatform)
    alias(libs.plugins.kotlinSerialization)
    alias(libs.plugins.sqldelight)
    alias(libs.plugins.androidLibrary) // verify current KMP-compatible Android plugin
}

kotlin {
    androidTarget()

    listOf(iosArm64(), iosSimulatorArm64()).forEach { target ->
        target.binaries.framework {
            baseName = "Shared"
            isStatic = true
        }
    }

    sourceSets {
        commonMain.dependencies {
            implementation(libs.kotlinx.coroutines.core)
            implementation(libs.kotlinx.serialization.json)
            implementation(libs.kotlinx.datetime)
            implementation(libs.ktor.client.core)
            implementation(libs.ktor.client.content.negotiation)
            implementation(libs.ktor.serialization.kotlinx.json)
            implementation(libs.sqldelight.coroutines)
        }
        androidMain.dependencies {
            implementation(libs.ktor.client.okhttp)
            implementation(libs.sqldelight.android.driver)
        }
        iosMain.dependencies {
            implementation(libs.ktor.client.darwin)
            implementation(libs.sqldelight.native.driver)
        }
        commonTest.dependencies {
            implementation(kotlin("test"))
            implementation(libs.kotlinx.coroutines.test)
        }
    }
}

sqldelight {
    databases {
        create("AppDatabase") {
            packageName.set("com.example.app.db")
        }
    }
}

The database schema

SQLDelight generates type-safe Kotlin from SQL files. Put this in shared/src/commonMain/sqldelight/com/example/app/db/Article.sq.

CREATE TABLE Article (
    id TEXT NOT NULL PRIMARY KEY,
    title TEXT NOT NULL,
    body TEXT NOT NULL,
    publishedAt INTEGER NOT NULL,
    isBookmarked INTEGER NOT NULL DEFAULT 0
);

selectAll:
SELECT * FROM Article ORDER BY publishedAt DESC;

selectById:
SELECT * FROM Article WHERE id = ?;

upsert:
INSERT OR REPLACE INTO Article(id, title, body, publishedAt, isBookmarked)
VALUES (?, ?, ?, ?, COALESCE((SELECT isBookmarked FROM Article WHERE id = ?), 0));

setBookmarked:
UPDATE Article SET isBookmarked = ? WHERE id = ?;

If you prefer Room, Room has KMP support (Android, iOS and desktop targets) from the AndroidX team; check the current Room KMP documentation for the supported driver and KSP setup. SQLDelight remains the SQL-first alternative; Room KMP is attractive if your Android team already knows Room annotations. Do not mix the two in one shared module.

expect and actual: platform seams

Use expect/actual for narrow platform seams like database drivers, secure storage, or a clock. Prefer interfaces plus dependency injection when the abstraction is wider than a function. Here is the database driver seam:

// commonMain
import app.cash.sqldelight.db.SqlDriver

expect class DriverFactory {
    fun createDriver(): SqlDriver
}

fun createDatabase(factory: DriverFactory): AppDatabase =
    AppDatabase(factory.createDriver())
// androidMain
import android.content.Context
import app.cash.sqldelight.db.SqlDriver
import app.cash.sqldelight.driver.android.AndroidSqliteDriver

actual class DriverFactory(private val context: Context) {
    actual fun createDriver(): SqlDriver =
        AndroidSqliteDriver(AppDatabase.Schema, context, "app.db")
}
// iosMain
import app.cash.sqldelight.db.SqlDriver
import app.cash.sqldelight.driver.native.NativeSqliteDriver

actual class DriverFactory {
    actual fun createDriver(): SqlDriver =
        NativeSqliteDriver(AppDatabase.Schema, "app.db")
}

Check the current SQLDelight documentation for the exact driver class names and whether the constructor signature has changed in your version. The pattern is stable even when parameter lists shift.

Networking with Ktor

import io.ktor.client.HttpClient
import io.ktor.client.call.body
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
import io.ktor.client.request.get
import io.ktor.serialization.kotlinx.json.json
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.Json

@Serializable
data class ArticleDto(
    val id: String,
    val title: String,
    val body: String,
    val publishedAtEpochMs: Long,
)

class ArticleApi(private val baseUrl: String, engineClient: HttpClient? = null) {
    private val client = engineClient ?: HttpClient {
        install(ContentNegotiation) {
            json(Json { ignoreUnknownKeys = true })
        }
    }

    suspend fun fetchArticles(): List<ArticleDto> =
        client.get("$baseUrl/v1/articles").body()
}

The default engine is chosen per platform from the engine dependency in each source set (OkHttp on Android, Darwin on iOS), so common code stays engine-free. Always set ignoreUnknownKeys = true on the client so backend additions do not crash old app versions.

Repository and use case

import app.cash.sqldelight.coroutines.asFlow
import app.cash.sqldelight.coroutines.mapToList
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map

data class Article(
    val id: String,
    val title: String,
    val body: String,
    val publishedAtEpochMs: Long,
    val isBookmarked: Boolean,
)

class ArticleRepository(
    private val api: ArticleApi,
    private val db: AppDatabase,
    private val io: CoroutineDispatcher = Dispatchers.Default,
) {
    fun observeArticles(): Flow<List<Article>> =
        db.articleQueries.selectAll()
            .asFlow()
            .mapToList(io)
            .map { rows ->
                rows.map {
                    Article(it.id, it.title, it.body, it.publishedAt, it.isBookmarked != 0L)
                }
            }

    suspend fun refresh(): Result<Unit> = runCatching {
        val remote = api.fetchArticles()
        db.transaction {
            remote.forEach {
                db.articleQueries.upsert(it.id, it.title, it.body, it.publishedAtEpochMs, it.id)
            }
        }
    }

    suspend fun toggleBookmark(id: String, value: Boolean) {
        db.articleQueries.setBookmarked(if (value) 1L else 0L, id)
    }
}

Note the design: the database is the single source of truth and the UI observes it. The network refresh writes into it. This offline-first pattern is the same on both platforms and is a classic reason to share code, because it is exactly the part teams get subtly different on each side.

Presentation layer: state and intents

Share the logic that decides what the screen shows. Keep it free of UI types.

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.cancel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch

data class ArticleListState(
    val items: List<Article> = emptyList(),
    val isRefreshing: Boolean = false,
    val error: String? = null,
)

sealed interface ArticleListIntent {
    data object Refresh : ArticleListIntent
    data class ToggleBookmark(val id: String, val value: Boolean) : ArticleListIntent
}

class ArticleListPresenter(private val repo: ArticleRepository) {
    private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate)
    private val _state = MutableStateFlow(ArticleListState())
    val state: StateFlow<ArticleListState> = _state.asStateFlow()

    init {
        scope.launch {
            repo.observeArticles().collect { list -> _state.update { it.copy(items = list) } }
        }
        onIntent(ArticleListIntent.Refresh)
    }

    fun onIntent(intent: ArticleListIntent) {
        when (intent) {
            ArticleListIntent.Refresh -> scope.launch {
                _state.update { it.copy(isRefreshing = true, error = null) }
                val result = repo.refresh()
                _state.update {
                    it.copy(isRefreshing = false, error = result.exceptionOrNull()?.message)
                }
            }
            is ArticleListIntent.ToggleBookmark ->
                scope.launch { repo.toggleBookmark(intent.id, intent.value) }
        }
    }

    fun close() = scope.cancel()
}

On Android, wrap the presenter in a ViewModel (or use the multiplatform ViewModel from AndroidX lifecycle, which now supports KMP; verify the current artifact) so it survives configuration changes. On iOS you hold it in an observable object and call close() from deinit. Note Dispatchers.Main requires the main dispatcher artifact on Android and works natively on iOS; verify the coroutines version in use.

Android UI consuming the shared module

@Composable
fun ArticleListScreen(presenter: ArticleListPresenter) {
    val state by presenter.state.collectAsStateWithLifecycle()

    Scaffold { padding ->
        LazyColumn(Modifier.padding(padding)) {
            if (state.error != null) {
                item { Text(state.error ?: "", color = MaterialTheme.colorScheme.error) }
            }
            items(state.items, key = { it.id }) { article ->
                ListItem(
                    headlineContent = { Text(article.title) },
                    trailingContent = {
                        IconToggleButton(
                            checked = article.isBookmarked,
                            onCheckedChange = {
                                presenter.onIntent(ArticleListIntent.ToggleBookmark(article.id, it))
                            },
                        ) { Icon(Icons.Default.Star, contentDescription = "Bookmark") }
                    },
                )
            }
        }
    }
}

SwiftUI consuming the shared module

Kotlin suspend functions are exposed to Swift as async functions and completion-handler functions. Kotlin Flow and StateFlow are not idiomatic Swift types. You have two options: a small hand-written adapter, or the SKIE plugin from Touchlab, which generates Swift-friendly APIs such as AsyncSequence for flows and Swift enums for sealed classes. Verify SKIE's current status and compatibility with your Kotlin version before adopting it. The hand-written adapter below has no dependency and is easy to read.

// iosMain or commonMain: a callback-based observer that Swift can call
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch

class StateObserver<T : Any>(private val flow: StateFlow<T>) {
    private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Main)
    private var job: Job? = null

    fun start(onEach: (T) -> Unit) {
        job?.cancel()
        job = scope.launch { flow.collect { onEach(it) } }
    }

    fun stop() { job?.cancel() }
}
import SwiftUI
import Shared

@MainActor
@Observable
final class ArticleListModel {
    private(set) var state = ArticleListState(items: [], isRefreshing: false, error: nil)
    private let presenter: ArticleListPresenter
    private let observer: StateObserver<ArticleListState>

    init(presenter: ArticleListPresenter) {
        self.presenter = presenter
        self.observer = StateObserver(flow: presenter.state)
        observer.start { [weak self] new in
            Task { @MainActor in self?.state = new }
        }
    }

    func refresh() { presenter.onIntent(intent: ArticleListIntentRefresh.shared) }

    func toggle(_ id: String, _ value: Bool) {
        presenter.onIntent(intent: ArticleListIntentToggleBookmark(id: id, value: value))
    }

    deinit {
        observer.stop()
        presenter.close()
    }
}

struct ArticleListView: View {
    @State private var model: ArticleListModel

    init(model: ArticleListModel) { _model = State(initialValue: model) }

    var body: some View {
        List(model.state.items, id: \.id) { article in
            HStack {
                Text(article.title)
                Spacer()
                Button {
                    model.toggle(article.id, !article.isBookmarked)
                } label: {
                    Image(systemName: article.isBookmarked ? "star.fill" : "star")
                }
                .accessibilityLabel("Bookmark")
            }
        }
        .refreshable { model.refresh() }
    }
}

The exact Swift names that Kotlin/Native generates for sealed interfaces and data objects (for example ArticleListIntentRefresh.shared) depend on the Kotlin version and export settings. Open the generated header in Xcode to confirm, or let SKIE produce cleaner enums. Also note Swift 6 strict concurrency: Kotlin objects are not Sendable from Swift's point of view, so keep all interaction on the main actor as above, and verify current Kotlin/Native guidance on Swift export (an evolving feature that aims to produce more idiomatic Swift APIs).

Making the iOS build practical

Distribute the shared module as an XCFramework through Swift Package Manager, or link it directly from the Xcode project with a Gradle script phase. The direct Gradle phase gives the fastest iteration; a prebuilt XCFramework gives the fastest iOS-only builds for iOS engineers who never touch Kotlin. Larger teams usually do both: direct link for developers, prebuilt binaries in CI for pure iOS contributors. Always build the framework as static unless you have a reason not to, and avoid exporting your entire dependency graph to Swift because every exported type adds to the header and to the binary.

Architecture: Compose Multiplatform

If you keep the same shared module but also share the screens, you get Compose Multiplatform. The ArticleListScreen above moves into commonMain with only Material 3 and Compose Multiplatform dependencies. The iOS entry point is a Kotlin function that returns a UIViewController:

// iosMain
import androidx.compose.ui.window.ComposeUIViewController

fun MainViewController() = ComposeUIViewController {
    App()
}
import SwiftUI
import Shared

struct ComposeView: UIViewControllerRepresentable {
    func makeUIViewController(context: Context) -> UIViewController {
        MainViewControllerKt.MainViewController()
    }
    func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
}

@main
struct iOSApp: App {
    var body: some Scene {
        WindowGroup { ComposeView().ignoresSafeArea() }
    }
}

What you gain

  • One UI codebase in the language your Android team already uses.
  • Gradual adoption: you can embed a Compose screen inside an existing SwiftUI app, or a native screen inside a Compose app.
  • Shared design tokens and previews.

What you pay

  • Platform feel. Compose draws its own controls. Scroll physics, text selection, context menus, keyboard avoidance and back gestures are emulated or bridged; some are excellent, some need tuning. Verify the iOS text input behaviour in the current release notes since it has been an area of active change.
  • New OS design languages. When Apple ships a redesign such as iOS 26's Liquid Glass, native SwiftUI adopts it by recompiling with the new SDK. A canvas-based toolkit must reproduce the effect itself, or host native views. Expect lag measured in months, and decide whether your brand cares.
  • Accessibility. Compose maps its semantics tree to iOS accessibility, but you must test with VoiceOver, Dynamic Type and Switch Control on real devices, not assume.
  • Binary size. The Skia runtime and Compose resources add megabytes.

Interop patterns that work

Start native, add Compose where sharing UI pays off: settings screens, forms and complex reusable widgets are the best candidates because they are visually platform-neutral. Keep navigation, camera, maps and anything tied to system chrome native. For the reverse direction, host native views in Compose through the platform view factories only for leaf components such as a map or a web view, not for whole screens, because gesture and layout composition across the boundary costs you debugging time.

Architecture: Flutter

Flutter's architecture is a single Dart codebase with its own widget tree and renderer. The same feature in idiomatic Flutter, using Riverpod for state and Drift for SQLite, looks like this. Package names are real; check pub.dev for current versions and for any API changes in Riverpod major versions, which have been substantial.

# pubspec.yaml (excerpt)
dependencies:
  flutter:
    sdk: flutter
  flutter_riverpod: ^3.0.0   # verify the current major version
  http: ^1.2.0
  drift: ^2.20.0
  sqlite3_flutter_libs: ^0.5.0
  path_provider: ^2.1.0
  path: ^1.9.0
dev_dependencies:
  build_runner: ^2.4.0
  drift_dev: ^2.20.0
  flutter_test:
    sdk: flutter
import 'dart:convert';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:http/http.dart' as http;

class Article {
  const Article({
    required this.id,
    required this.title,
    required this.body,
    required this.publishedAt,
    this.isBookmarked = false,
  });

  final String id;
  final String title;
  final String body;
  final DateTime publishedAt;
  final bool isBookmarked;

  factory Article.fromJson(Map<String, dynamic> json) => Article(
        id: json['id'] as String,
        title: json['title'] as String,
        body: json['body'] as String,
        publishedAt: DateTime.fromMillisecondsSinceEpoch(
          json['publishedAtEpochMs'] as int,
        ),
      );

  Article copyWith({bool? isBookmarked}) => Article(
        id: id,
        title: title,
        body: body,
        publishedAt: publishedAt,
        isBookmarked: isBookmarked ?? this.isBookmarked,
      );
}

class ArticleApi {
  ArticleApi(this._client, this._baseUrl);
  final http.Client _client;
  final String _baseUrl;

  Future<List<Article>> fetchArticles() async {
    final response = await _client.get(Uri.parse('$_baseUrl/v1/articles'));
    if (response.statusCode != 200) {
      throw http.ClientException('HTTP ${response.statusCode}');
    }
    final list = jsonDecode(response.body) as List<dynamic>;
    return list
        .map((e) => Article.fromJson(e as Map<String, dynamic>))
        .toList();
  }
}

final apiProvider = Provider<ArticleApi>(
  (ref) => ArticleApi(http.Client(), 'https://api.example.com'),
);

class ArticleListNotifier extends AsyncNotifier<List<Article>> {
  @override
  Future<List<Article>> build() => ref.read(apiProvider).fetchArticles();

  Future<void> refresh() async {
    state = const AsyncLoading<List<Article>>().copyWithPrevious(state);
    state = await AsyncValue.guard(() => ref.read(apiProvider).fetchArticles());
  }

  void toggleBookmark(String id) {
    final current = state.value ?? const [];
    state = AsyncData([
      for (final a in current)
        if (a.id == id) a.copyWith(isBookmarked: !a.isBookmarked) else a,
    ]);
  }
}

final articleListProvider =
    AsyncNotifierProvider<ArticleListNotifier, List<Article>>(
  ArticleListNotifier.new,
);
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

class ArticleListScreen extends ConsumerWidget {
  const ArticleListScreen({super.key});

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final articles = ref.watch(articleListProvider);

    return Scaffold(
      body: RefreshIndicator(
        onRefresh: () => ref.read(articleListProvider.notifier).refresh(),
        child: articles.when(
          loading: () => const Center(child: CircularProgressIndicator()),
          error: (e, _) => Center(child: Text('Error: $e')),
          data: (items) => ListView.builder(
            itemCount: items.length,
            itemBuilder: (context, i) {
              final a = items[i];
              return ListTile(
                key: ValueKey(a.id),
                title: Text(a.title),
                trailing: IconButton(
                  tooltip: 'Bookmark',
                  icon: Icon(a.isBookmarked ? Icons.star : Icons.star_border),
                  onPressed: () => ref
                      .read(articleListProvider.notifier)
                      .toggleBookmark(a.id),
                ),
              );
            },
          ),
        ),
      ),
    );
  }
}

This sample elides the Drift persistence to stay readable; the offline-first pattern is identical to the repository and use case section in the KMP architecture above: a Drift query stream is the source of truth and a refresh function writes into it. In a real app, give the repository interface a fake implementation for tests.

What Flutter does best

  • Iteration speed. Stateful hot reload remains the best in the industry for UI work.
  • Consistency. The same pixels everywhere; no OS-version rendering differences.
  • Custom UI and animation. Custom painters, shaders and implicit animations are first-class.
  • Breadth of targets. Web, desktop and embedded targets exist, with maturity varying per target.

Where Flutter bites

  • Platform views and plugins. Embedding native maps, ads, or web views has costs; plugin quality varies, and abandoned plugins become your problem.
  • Platform UI changes. Same lag as Compose Multiplatform for new system design languages.
  • Dart. Excellent language, small ecosystem outside Flutter. Server-side code sharing with Dart is uncommon.
  • Large screens and accessibility. Fully supported but must be tested deliberately.

React Native, briefly

If your team is TypeScript-first, React Native with Expo is a legitimate answer and usually the lowest hiring risk. Keep the same architecture principles: a data layer that owns persistence and sync (for example with SQLite plus a typed query layer), a state layer with explicit view-state, and thin screens. Where it differs from Flutter: it renders real native controls, which helps platform feel and accessibility, but your JavaScript and native modules form a boundary that you profile when lists, gestures or animations misbehave. Plan time for upgrade work at each React Native and Expo SDK release, and prefer libraries that support the New Architecture. Verify the current React Native and Expo versions and their support policy in the official docs before committing.

Performance, size, hot reload, and what to actually measure

Public benchmarks answer someone else's question. Your decision should rest on measurements for your own hard screens on mid-range hardware, not the flagship phone on your desk.

The metrics that matter

MetricHow to measureWhy it matters
Cold start timeAndroid: adb shell am start -W, Macrobenchmark; iOS: Instruments App Launch template, MetricKitFirst impression; retention
Frame time and jankAndroid: JankStats, Macrobenchmark, Perfetto; iOS: Instruments Animation Hitches; Flutter: DevTools performance viewScroll and animation smoothness
Install sizeApp thinning report (iOS), bundletool size analysis (Android)Download conversion in emerging markets
MemoryInstruments Allocations, Android Studio ProfilerCrashes on low-end devices
Battery and background costXcode Energy Organizer, Android vitalsStore ranking and user trust
Build time (local and CI)Gradle build scans, Xcode build timelineEngineering throughput

Realistic expectations

  • Native UI with a KMP core is within noise of fully native for startup and frame time; Kotlin/Native's memory model is modern and no longer the source of the old freezing pitfalls. Where it can cost you is frameworks of large exported surface area and cross-language call volume in tight loops.
  • Flutter and Compose Multiplatform render at the display's refresh rate for well-written screens. Start-up is slightly higher because of engine and runtime initialisation. Shader compilation jank was historically a Flutter concern and Impeller was built to remove it by precompiling shaders; still, profile on real devices.
  • React Native performs well with Hermes and the New Architecture; trouble appears when many events cross the JavaScript and native boundary per frame.

Hot reload and developer loop

Flutter's hot reload preserves state and is nearly instant. Native SwiftUI Previews and Compose Previews are good for components but struggle with data-dependent screens. Compose Multiplatform has hot reload tooling for desktop targets; its availability and quality for iOS targets should be verified in the current docs. A common team pattern with KMP is to iterate on logic with fast JVM unit tests and on UI with each platform's previews, which is quicker than it sounds.

Hiring, team structure, and long-term risk

Hiring

  • Native iOS and Android specialists are plentiful in most markets but expensive, and you need both.
  • Kotlin developers are plentiful because every Android developer qualifies. Android developers adopt KMP quickly. iOS developers adopt it more slowly, so the shared module needs an owner and iOS developers need a short onboarding to read Kotlin.
  • Dart and Flutter developers are a smaller but active pool. Many are web or mobile generalists who learned Flutter first. Interview for architectural judgment rather than API recall.
  • TypeScript and React is the largest pool by far.

A pragmatic rule: choose the stack for which you can hire a replacement for your most senior engineer within three months.

Risk register

RiskNativeKMP + native UICompose MPFlutterReact Native
Vendor abandonmentVery lowLow (JetBrains plus Google backing)Low to mediumLow to medium (Google priorities can shift)Low (Meta, Expo, large community)
Breaking upgradesOS yearlyKotlin and library cadenceSame plus UIFlutter quarterly releasesRelease plus native deps
New OS feature lagNoneNone for UIMonthsMonthsWeeks to months
Plugin or library gapsNoneSome KMP libraries missingSomePlugin quality variesNative module quality varies
Exit costn/aLowMediumHighHigh
Single points of failureTwo teamsKMP expert neededSameDart expertsJS plus native experts

Governance for shared code

If you share logic, treat the shared module as a product with owners. Define an API stability policy, a review rule that every shared change gets one reviewer from each platform, a versioning scheme if apps release independently, and an explicit list of what must never be in shared code (UI types, platform-specific assumptions, analytics vendor SDKs tied to one OS).

Migration paths

Few teams start from a blank sheet. The migration question is usually how to move in without a rewrite and how to retreat if it fails.

Native to KMP, incrementally

  1. Pick a leaf module with clear inputs and outputs: validation rules, pricing calculation, date and currency formatting, the API client, or the sync engine.
  2. Write it in Kotlin in a new shared module, with tests in commonTest. Android adopts it as a Gradle dependency.
  3. Wire iOS through an XCFramework and keep the Swift implementation behind a flag until parity tests pass.
  4. Delete the duplicates only after one full release cycle in production.
  5. Move up the stack: repositories, then presenters. Stop whenever the marginal return drops.

Contract tests help: run a JSON fixture suite against the old Swift implementation and the new Kotlin one, and require identical outputs.

Native to Flutter or Compose Multiplatform via add-to-app

Both support embedding into existing native apps. Move one screen or flow at a time, starting with something low-risk like onboarding or settings. Watch for: duplicated navigation state, two themes to keep consistent, authentication state shared between worlds, and the build-time cost of two toolchains. Flutter's add-to-app documentation covers module integration; for Compose Multiplatform, the ComposeUIViewController embeds in a SwiftUI host as shown in the Compose Multiplatform architecture section.

Cross-platform back to native

The reverse migration happens more than people admit. It is cheapest from KMP-with-native-UI (just remove the shared module and inline the Kotlin or port it to Swift) and most expensive from a canvas-rendered UI, because every screen must be rewritten. This asymmetry is the main reason I default to sharing logic before UI.

React Native to anything

Isolate business logic in TypeScript packages with no React imports first. Those can be ported or wrapped, and the same discipline makes a future KMP migration of the shared core possible.

Testing and CI

Test pyramid for shared code

  • Common unit tests in commonTest run on JVM and on iOS simulator targets. They cover domain logic and presenters with fake repositories and kotlinx-coroutines-test.
  • Platform integration tests verify the actual implementations: database driver, secure storage, file access.
  • UI tests per platform: XCUITest or Swift Testing plus UI tests on iOS; Compose UI tests on Android. For Flutter, widget tests plus the integration_test package.
  • Screenshot tests guard against visual regressions: Paparazzi or Roborazzi on Android, snapshot-testing libraries on iOS, golden tests in Flutter.
  • Contract tests against the API (for example with recorded fixtures or a schema) so that all clients agree.
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlinx.coroutines.test.runTest

class ArticleListPresenterTest {
    @Test
    fun refreshPopulatesItems() = runTest {
        val repo = FakeArticleRepository(listOf(sampleArticle("1"), sampleArticle("2")))
        val presenter = ArticleListPresenter(repo)
        presenter.onIntent(ArticleListIntent.Refresh)
        // Advance until idle in your test dispatcher setup, then assert:
        assertEquals(2, presenter.state.value.items.size)
    }
}

In real code, inject the dispatcher into the presenter so tests can replace it with a test dispatcher; the presenter in the KMP architecture section above uses Dispatchers.Main.immediate for brevity and needs Dispatchers.setMain in tests.

CI blueprint

You need a macOS runner for iOS targets and Kotlin/Native iOS compilation. Keep Linux jobs for everything that does not need macOS because macOS minutes are costlier and slower to queue.

name: ci
on:
  pull_request:
  push:
    branches: [main]

jobs:
  shared-jvm:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          distribution: temurin
          java-version: 21
      - uses: gradle/actions/setup-gradle@v4
      - run: ./gradlew :shared:jvmTest :androidApp:testDebugUnitTest :androidApp:lintDebug

  shared-ios:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          distribution: temurin
          java-version: 21
      - uses: gradle/actions/setup-gradle@v4
      - run: ./gradlew :shared:iosSimulatorArm64Test
      - run: ./gradlew :shared:assembleSharedXCFramework
      - name: Build iOS app
        run: |
          xcodebuild -project iosApp/iosApp.xcodeproj -scheme iosApp \
            -destination 'platform=iOS Simulator,name=iPhone 16' build

  android-screenshots:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          distribution: temurin
          java-version: 21
      - uses: gradle/actions/setup-gradle@v4
      - run: ./gradlew :androidApp:verifyPaparazziDebug

Pin action versions to the majors current when you copy this (verify), choose a simulator name that exists on the runner's Xcode version, and cache Gradle and Kotlin/Native directories. Run a periodic job that builds against the latest Xcode and Android Gradle Plugin betas so upgrades surprise you in a pull request rather than on release day. Make the XCFramework a build artifact so iOS-only contributors can skip Kotlin compilation.

Release engineering

Keep one version number scheme across platforms even if releases are independent, and record the shared-module commit in both apps' build metadata so a crash report on either platform points to the exact shared code. Upload debug symbols for Kotlin/Native frameworks: Kotlin/Native produces dSYM files that your crash reporter needs to symbolicate iOS crashes in shared code.

The two-week proof-of-concept plan

The purpose of a proof of concept is to try to kill your favourite option while it is cheap. Do not build a "hello world". Build the hardest realistic slice.

Choose the slice

Pick one flow that touches: authenticated API calls, an offline cache, a list with 1,000 or more items and images, a form with validation, one platform integration (push, camera, biometric prompt, or a widget), and one custom UI piece from your design system. Every finalist builds the same slice.

Schedule

DaysActivityOutput
1Define slice, acceptance criteria, devices, metrics; set up repo and CI skeletonOne-page spec
2 to 3Build the data layer (API, cache, sync) in each finalist's idiomPassing tests, working offline
4 to 6Build screens: list, detail, form, custom componentFeature-complete slice
7Platform integration (biometrics, push, widget or camera)Evidence of interop friction
8Accessibility pass: VoiceOver, TalkBack, Dynamic Type or font scale, reduced motionDefect list per option
9Performance on mid-range physical devices: cold start, jank, memory, install sizeNumbers table
10CI: build, test, sign, distribute through TestFlight and internal trackWorking pipeline
11Developer experience retrospective: build times, debugging, onboarding a new engineerScores and notes
12Upgrade drill: bump the framework and a key dependency; note breakageUpgrade cost estimate
13Exit-cost estimate: how would we leave this choice?Written estimate
14Decision meeting with the matrix belowDecision record

Scoring matrix

Weight the criteria before you build anything, so the data cannot be rationalised afterwards.

CriterionWeight (example)NativeKMP + nativeCompose MPFlutter
Time to build the slice15
Platform fit and accessibility defects20
Performance on mid-range device15
Install size5
Developer experience and build times10
Hiring confidence15
Upgrade friction10
Exit cost10

Score each cell 1 to 5 and multiply. Record the totals, and also the single worst finding per option. The worst finding is usually what you'll live with.

Exit criteria

Define kill conditions up front. Examples: more than three accessibility defects that required native workarounds; cold start more than 20 percent slower than native on the reference device; any blocking plugin gap with no maintained alternative; CI cold build time over your budget. A candidate that trips a kill condition is eliminated without further debate.

Where teams go wrong

  • Choosing by benchmark blog posts. Measure your own slice on your own devices.
  • Sharing UI to share UI. The goal is lower total cost, not a higher percentage of shared lines. Sharing lines that were cheap to write twice buys little.
  • Putting platform types in shared code. Context, UIImage and vendor analytics SDKs in the shared module destroy portability. Use interfaces.
  • Exporting everything to Swift. Huge Objective-C headers slow builds and make awkward APIs. Export a small facade.
  • Ignoring the iOS team in a KMP rollout. If iOS engineers can't read the shared code, they will resist and fork logic. Pair, document, and rotate ownership.
  • Treating Flutter or Compose accessibility as automatic. It's good, not automatic. Test with screen readers.
  • Having no upgrade policy. Frameworks move quarterly, so schedule an upgrade cadence or you will face a multi-month catch-up.
  • Skipping the architecture dependency rule. Business logic that imports UI toolkit packages can't be tested quickly or moved.
  • Underestimating macOS CI. Plan for macOS runner capacity and caching early.
  • Hiding native expertise. Even cross-platform apps need at least one engineer who deeply knows each platform's lifecycle, permissions, signing and store rules.
  • Picking by fashion at the executive level. Present the matrix, the kill conditions and the exit cost.
  • Forgetting web. If a web app is on the roadmap, include that in the framework's evaluation now, and check the current maturity of each option's web target.

When not to do this

  • Don't adopt KMP for a tiny single-platform app. If you ship only Android, there is no sharing to buy.
  • Don't share logic when your two platforms differ in business rules. If iOS and Android genuinely behave differently, a shared module becomes a thicket of conditionals.
  • Don't choose Flutter or Compose Multiplatform if your product is defined by the newest system UI features, such as deep widget, Live Activity or system-material fidelity.
  • Don't go fully native with a team of two unless the app is simple and platform-driven; you will ship half as fast and diverge.
  • Don't start with a rewrite. If a working native app exists, migrate by slices with parity tests; a big-bang rewrite is the classic way to lose a year.
  • Don't choose a stack to attract hires you can't afford. The best framework is useless without people.
  • Don't trust this guide's version numbers. Check them.

A checklist you can paste into your decision record

DECISION RECORD: mobile stack
Date:
Owners:

Inputs
[ ] Team skills inventory (Kotlin / Swift / Dart / TypeScript headcount)
[ ] Product centre of gravity (platform features vs content/workflow)
[ ] Design rigidity (platform-native vs custom brand)
[ ] Target OS versions and devices (include a low-end reference device)
[ ] Expected lifetime and release cadence
[ ] Web/desktop requirements

Options evaluated
[ ] Native (SwiftUI + Compose)
[ ] KMP + native UI
[ ] Compose Multiplatform
[ ] Flutter
[ ] React Native

Evidence
[ ] 2-week PoC slice built for each finalist
[ ] Performance numbers on reference devices
[ ] Accessibility audit results
[ ] CI pipeline running for each finalist
[ ] Upgrade drill completed
[ ] Exit-cost estimate written

Decision
Chosen:
Top two risks:
Mitigations:
Kill conditions and review date:

Questions that come up

Is Kotlin Multiplatform production-ready in 2026? Yes for sharing business logic; many companies ship it at scale. Compose Multiplatform for iOS has been stable since 1.8.0. Verify the current stable versions and minimum requirements on the official compatibility page.

Should I share UI or only logic? Default to logic. Share UI when your design is custom and brand-first, your team is small, or your screens are form-heavy and platform-neutral. Remember sharing UI makes exit costlier.

Is Flutter dying because of Compose Multiplatform? No. Flutter continues regular releases and has a large installed base. The two are converging in the "draw your own pixels" camp, so the practical decider is language and team skills: Dart versus Kotlin.

Can I use KMP with an existing SwiftUI app? Yes. Add the shared module as an XCFramework dependency and call it from SwiftUI. Start with a leaf module such as validation or the API client.

How do I handle push notifications, deep links and permissions in shared code? Keep platform handling native and expose a small event interface to shared code. The shared module should receive typed events like "open article 42", not raw platform payloads.

Does cross-platform hurt App Store approval or review? No. Apps are reviewed on behavior and policy, not the framework. Native review requirements such as privacy manifests and permission strings still apply.

Sources and docs