https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

saket

08/08/2019, 3:48 AM
Does anyone have/know of a project that targets both Android and macOS and has a GUI? It'd be nice to have a reference.
u

4ntoine

08/08/2019, 1:15 PM
Nope. But there were some interesting experiments with kotlin + flutter as cross-platform ui: https://habr.com/ru/post/437176/ (rus). Can sound as overenginerring though
k

Kris Wong

08/08/2019, 1:17 PM
I would not recommend trying to create your GUI in a kotlin MPP. it's not designed for that purpose.
i managed to create a simple screen in a kotlin MPP and even that was not a great experience.
now, maybe kotlin + flutter might be something worth trying
😿 1
s

saket

08/08/2019, 1:34 PM
@Kris Wong do you instead recommend to only share code with macOS?
k

Kris Wong

08/08/2019, 1:35 PM
logic and interfaces are great to share
1
j

Jeremy

08/08/2019, 1:43 PM
Yes KN is generally better used as a lib for logic. Flutter is a full stack framework. KN fits well into a clean arch style project
s

saket

08/08/2019, 1:54 PM
actually wait I was half asleep and I just realized that is not what I intended to ask/say: I'm not trying to build my GUI in Kotlin.
I am instead looking for projects that have UI written with AppKit and are sharing code with Kotlin.
Most of the tutorials are targeting iOS because that seems like the primary usecase.
u

4ntoine

08/08/2019, 1:57 PM
s

saket

08/08/2019, 2:01 PM
Interesting. Does JavaFx also run on macOS?
u

4ntoine

08/08/2019, 5:23 PM
sure
j

Jeremy

08/08/2019, 5:31 PM
Key advantage of KN is ability to use integration with platform SDKs. This enables using native SDKs. Using a cross platform UI (Flutter, JavaFX) + KN will work but seems defeatist
s

saket

08/08/2019, 5:33 PM
right
u

4ntoine

12/23/2019, 7:22 AM
Late update: there is an attempt to write multiplatform UI widgets set: https://github.com/icerockdev/moko-widgets