Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does Kotlin Multiplatform mobile handle the UI layer for both iOS and Android? I thought you could only share business logic


Not currently. Jetbrains has extended Google's Compose framework with a desktop and and web variant recently. However, IOS is notably not covered by these. Though you might reasonably expect them to be going there as well.

Compose desktop currently target the JVM, which of course is not going to work on IOS. They do use Skia for the UI; which is also what Google is using with Flutter, I think.

Targeting the Kotlin native compiler would be a logical next step. It's currently quite usable for porting libraries between different platforms. However, I'm guessing they would need to do a bit of work on improving the multi platform library ecosystem to be able to have enough of a base platform for developing full applications with it. Targeting IOS would be a logical next goal once they are able to do that.


You are correct. The technical details of the solutions I listed can be different, but in the end they are often competing for the same users (I need an app, which solution should I use).


I haven't looked too deeply into how BeeWare works, but why is it so uncommon to see similar solutions in other languages like Kotlin, Go, Rust etc? Basically the React Native approach but without JS. I would love to write multiplatform native UIs in any of these languages.

I have nothing against Javascript but there are still a lot of weird limitations in RN despite being several years old. Writing smooth animations that support user interaction is difficult because it is still single threaded and you are limited to a declarative animation api where the underlying native runtime does the interpolation.

React-reanimated v2 tries to solve this by spawning JS worklets that can run animation code in another thread but that comes with its own caveats. This would be so much easier to do in a language with built in threading, not to mention all these languages are very ergonomic and loved by developers so I'm curious why something similar hasn't been tried for them yet.


For the languages it boils down to availability of relevant ecosystem and developers in my experience.

Why react-native, well, because it means you have access to one of the largest ecosystems and an awesome tooling catalogue. The same applies for JS as the language of choice for App (UIs). Kotlin was also a great candidate since it could leverage the already mature Java ecosystem for android.

Flutters success is an outlier here that I would guess is due to Google backing. The resources and docs are good and you could rely on financial and developer backing. The decision to go with Dart was most likely to make themselves not dependent on another party for a core utility and to have a steering position on the overall projects course.

If, for example, Microsoft would back a good C# cross-platform framework I would bet on it at least seeing moderate adoption.

Edit: As another commenter pointed out, GO has a cross-platform GUI Framework option - Fyne [https://github.com/fyne-io/fyne]


A C# cross-platform framework already exists - .NET Multi-platform App UI (MAUI).


Edit: It looks like there are some efforts to bring it to iOS https://github.com/cl3m/multiplatform-compose




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: