Also how do we compile the compose-UI to swift for...
# compiler
b
Also how do we compile the compose-UI to swift for eg, and still look like a native app and feel like a native app and all the sliders and buttons, everything? Do we compile to Swift UI under the hood?
y
No. Compose for iOS works pretty well to "match" the underlying style of the platform.
e
There is #C3PQML5NU channel
c
an #CJLTWPH7S and #C0346LWVBJ4
b
so compose just has a different UI style on ios but its still not swift-ui? how does that compilation work?
y
It draws into a canvas on screen basically, to my understanding at least. It does have integrations with Swift UI
c
High level view: compose comes with its own rendering engine and draws on a canvas.
b
thats what flutter does, but flutter is slow and on ios the styles look like android material lol. how is kmp being more performant than flutter? We have a "canvas" on android also? that's surprising.
c
Flutter is slow(er) because it need dart engine to run. Kotlin in the end is still compiled down to the native code.
In Android it’s the same „canvas“ the old view system renders on.
y
The styles for Compose are specifically made to match the platform. Flutter just took a different approach to styling, that's all.
c
No. Compose is not made to match a platform. Without styling or an appropriate library a button on iOS and on Android will look the same. It‘s not that on iOS it will automatically look like an iOS button.
b
so flutter is more like a game engine than a framework? dart engine is a VM?
@Chrimaeon
y
https://www.jetbrains.com/compose-multiplatform/ Seems to suggest that styling matches the platform 🤷🏼 I haven't used it enough though to know, so I may be very incorrect.
c
No, it does not. Let me find the samples repo.
https://github.com/JetBrains/compose-multiplatform/tree/master Check the screenshots. Android, iOS, desktop, etc look all the same.
@Brahh I would not say game engine but yes dart is run on the device.