# Improving shared architecture for a Kotlin Multiplatform, Jetpack Compose and SwiftUI app

DevFeed: [Improving shared architecture for a Kotlin Multiplatform, Jetpack Compose and SwiftUI app](<https://devfeed.tech/articles/improving-shared-architecture-for-a-kotlin-multiplatform-jetpack-compose-and-swiftui-app-25566.md>)

Original publisher: [Read original article](<https://www.marcogomiero.com/posts/2022/improved-kmm-shared-app-arch/>)

Author: Marco Gomiero

Published: 2022-06-26T00:00:00Z

Content type: tutorial

Language: en

Sources: [Posts on Marco Gomiero](<https://devfeed.tech/sources/posts-on-marco-gomiero.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [SwiftUI](<https://devfeed.tech/topics/swiftui.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-jetpack](<https://devfeed.tech/tags/android-jetpack.md>), [app](<https://devfeed.tech/tags/app.md>), [app-architecture](<https://devfeed.tech/tags/app-architecture.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [article](<https://devfeed.tech/tags/article.md>), [compose](<https://devfeed.tech/tags/compose.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [flow](<https://devfeed.tech/tags/flow.md>), [ios](<https://devfeed.tech/tags/ios.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [mvvm](<https://devfeed.tech/tags/mvvm.md>), [swiftui](<https://devfeed.tech/tags/swiftui.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

## AI overview

This tutorial explains how to improve a shared application architecture for Kotlin Multiplatform, Jetpack Compose, and SwiftUI. It replaces duplicated suspendable and non-suspendable methods plus platform-specific callbacks with Kotlin and Swift wrapper code that allows Swift to consume Kotlin Flow, enabling a single UseCase method that returns a Flow.

## Source excerpt

A couple of years ago I started working on a pet project to manage personal finances, named MoneyFlow. This project soon became a personal playground for a Kotlin Multiplatform mobile app and in a previous article, I journaled all the steps that lead me to a satisfying (at least for that time) shared app architecture. Choosing the right architecture for a [new] Kotlin Multiplatform, Jetpack Compose and SwiftUI app