so compose just has a different UI style on ios bu...
# compose
b
so compose just has a different UI style on ios but its still not swift-ui? how does that compilation work?
c
Please don’t cross-post your questions. Keep the discussion in a single thread. Others might be interested in the answer so the context is lost.
m
Compose does custom 2D rendering. I believe it uses skia for the rendering on iOS. For the style it can use the same style as Android by using Material design library. That should produce fairly similar styles. But there are also third part styles that try to mimic iOS default styles.
b
what does it use for rendering on the web and on android and on desktop?
And skia is c++, damn
c
On the web is a <canvas> Android is using skia for the view system so it just reuses it. On desktop/iOS it’s Skiko the Kotlin binding for skia.
m
Compose also has some special library for web that simulates HTML and manipulates the DOM directly. But I would consider that part of CMP
c
Compose-HTML just uses the Compose Runtime but not the rendering engine.
b
compose runtime to create the DOM? and does the site at the end feels like it was generated by static-site-generator or react/nextjs?
whats CMP?
m
Compose Multi Platform
c
Compose-HTML is more like react and angular. No static site. Just JS code that manipulates the Dom.
b
Lol this rabbit hole turned out to be disappointing, I thought KMP is actually multiplatform and not just some marketing sham like flutter/react-native/xamarin/.net etc turned out to be. on web: its not native, if its not static/html/css/js on ios: its not native if the styles are not different from android ones atleast. on desktop: its not native if its not qt/gtk on linux, swiftUI on mac & on windows win32/winUI also skiko being c++ under the hood confuses me Kek. Well it atleast feels its more performant than the rest 🤷‍♀️, for now, will have to run my own tests to confirm whats being marketed on the front pages. Also if dart has an "engine", kotlin prob has compose-runtime, kotlin-runtime, how does it compile to JVM bytecode again?
🆗 4
🙄 3
🥱 8
👎🏿 1
👎🏾 1
👎 1
s
* grabs popcorn *
😅 2
🍿 7
m
KMP != CMP You can build everything besides the UI in KMP and then use whatever UI that is native to talk to it. I have certainly used UIKit, SwiftUI and Android View system, and Android Compose with all sharing logic written with KMP. I see no problem using qt/gtk or win32 on those platforms, I've just never developed for them. My default preference is native UI and shared logic, which is why I like KMP over things like flutter and react native.
s
If this were Twitter, @jim would usually show up on posts like this with prepared bookmarks and explain everything.
On iOS, Kotlin compiles to native code and runs within the same process as the application, alongside native Swift code. This means it operates in the same memory space, with no additional virtual machines or memory regions involved. In that sense, it’s native at the process level, it runs in the same process as Swift, UIKit, SwiftUI, and so on. So you can call the iOS SDK directly, without any bridges, channels, or similar intermediaries.
c
When will people stop taking clickbait? We owed this poster the original conversation but they deserved no response after that mocking response that was sent to the channel.
2
b
i think kmp/cmp/kotlin-runtime is far better than the other options/approches to multi-platform (as it shares same memory), but if the community can't even take some mockery from a rando, is the struggle even worth it?
👎🏿 1
👎🏾 1
s
This must be a brand new metric I am not yet familiar with. A technology is only as promising as its community is welcome to random bullies that enter their space and kick off the conversation by mocking them.
📈 1
c
I would accept the mockery if it was preceded by proper research, and hard facts. Instead you just spouted your opinion as if it is a fact. • You used terms like "marketing sham" • You did not even bother to research and you claimed that KMP is not native (this is just blatantly false. KMP is native) • For CMP you mentioned some of your opinions on what is and is not native without substantiating them • For KMP with actual native UI you made claims without trying to understand it - it is possible to use fully native SwiftUI with KMP for business logic (that's what KMP started out as, CMP for cross-platform UI was added later). That's not just some lightweight jest. That's intentional clickbait.