Hey everyone :wave: This is my second joining. I ...
# getting-started
a
Hey everyone 👋 This is my second joining. I used to be an Android dev in the past and later switched to an architect role. Currently, actively working on a Flutter and a SwiftUI app. For one of my next project, I am thinking about using SwiftUI but would prefer to use KMP for shared business logic as I might launch a native Android app later on. The last time I checked KMM/KMP, there was no shared UI feature. I am certain that the new app requirement will need SwiftUI for UI. Can we still use KMP just for shared logic and not use shared UI? I am a bit confused with the new additions. Can anyone please point me to the right direction?
j
Yes, there's no requirement to use Compose Multiplatform for UI with KMP. You can share Kotlin code at whatever level makes sense for your app. There are apps that do this up to the presentation layer and bind native UI to shared viewmodels, including SwiftUI for iOS. I'm in the process of adding SwiftUI to a sample app for my library now. SKIE is super helpful creating improved Swift interop. I've got this super basic example app that has SwiftUI calling shared Kotlin code. Alternatively, you could just share repositories or other business logic elements. I've done this in other apps myself, with existing UIKit iOS and XML Android UIs.
a
Thanks Jeff. I will check it out. 🙌
👍🏼 1