<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/is-androidx-viewmodel-the-best-choice-for-kmp-projects--ynerkfjon" -->

---
title: Is AndroidX ViewModel the best choice for KMP projects?
description: AndroidX ViewModel was designed to solve Android-specific lifecycle problems, but its suitability for Kotlin Multiplatform projects depends heavily on the...
canonical: https://daily.dev/posts/is-androidx-viewmodel-the-best-choice-for-kmp-projects--ynerkfjon
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Is AndroidX ViewModel the best choice for KMP projects? | daily.dev
og:description: AndroidX ViewModel was designed to solve Android-specific lifecycle problems, but its suitability for Kotlin Multiplatform projects depends heavily on the...
og:url: https://daily.dev/posts/is-androidx-viewmodel-the-best-choice-for-kmp-projects--ynerkfjon
og:image: https://api.daily.dev/og/posts/ynerKfjON.png
og:image:alt: Is AndroidX ViewModel the best choice for KMP projects?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Is AndroidX ViewModel the best choice for KMP projects?

**[Touchlab](https://daily.dev/sources/touchlab)** · 12 min read · 0 upvotes · 0 comments

## Summary

AndroidX ViewModel was designed to solve Android-specific lifecycle problems, but its suitability for Kotlin Multiplatform projects depends heavily on the target platforms and team composition. For Compose Multiplatform projects, it works well out of the box. However, when targeting native iOS UI or working with iOS teams that have strong architectural opinions, the Android-centric lifecycle management feels foreign to Swift developers. The post explores the conceptual differences between Android and iOS interpretations of ViewModel, shows the boilerplate required to use AndroidX ViewModel on iOS, and presents a DIY alternative using expect/actual declarations with SKIE for StateFlow binding — offering a more platform-native feel for iOS developers.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://touchlab.co/kmp-view-models>

## Similar posts on daily.dev

- [KMP Architecture: The Case for Pure Kotlin ViewModels](https://daily.dev/posts/kmp-architecture-the-case-for-pure-kotlin-viewmodels-2xnkadg3i) · ProAndroidDev · 1 upvotes · 0 comments
- [Why we love multiplatform with Kotlin and Compose](https://daily.dev/posts/why-we-love-multiplatform-with-kotlin-and-compose-ygw5twyaa) · Q42 Engineering · 0 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#kotlin](https://daily.dev/tags/kotlin), [#swiftui](https://daily.dev/tags/swiftui), [#compose-multiplatform](https://daily.dev/tags/compose-multiplatform)

[View this post on daily.dev](https://daily.dev/posts/is-androidx-viewmodel-the-best-choice-for-kmp-projects--ynerkfjon)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Is AndroidX ViewModel the best choice for KMP projects?","url":"https://daily.dev/posts/is-androidx-viewmodel-the-best-choice-for-kmp-projects--ynerkfjon","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/is-androidx-viewmodel-the-best-choice-for-kmp-projects--ynerkfjon"},"datePublished":"2026-08-02T07:15:21.027Z","dateModified":"2026-08-02T07:35:45.994Z","description":"AndroidX ViewModel was designed to solve Android-specific lifecycle problems, but its suitability for Kotlin Multiplatform projects depends heavily on the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d50d31bacfa4e850b34c33d87c785c37?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d50d31bacfa4e850b34c33d87c785c37?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Touchlab","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Touchlab","logo":"https://media.daily.dev/image/upload/s--CQ0u6GwB--/f_auto,q_auto/v1785654902/logos/touchlab?_a=BAMAMicg0","url":"https://daily.dev/sources/touchlab"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/is-androidx-viewmodel-the-best-choice-for-kmp-projects--ynerkfjon","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming,kotlin,swiftui,compose-multiplatform","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Touchlab","item":"https://daily.dev/sources/touchlab"},{"@type":"ListItem","position":3,"name":"Is AndroidX ViewModel the best choice for KMP projects?"}]}
```

