Re:Java 18 / JDK 18: General Availability
by ohgodplsno on Tuesday March 22, 2022 @12:34PM
(#30768228)
Or Kotlin Multiplatform, which generates .frameworks/cocoapods/spm files that you can use, and all you have to do is write your UI layer in Swift.
Re:Java 18 / JDK 18: General Availability
by native_samples on Tuesday March 22, 2022 @02:08PM
(#30769394)
You can ship to iOS with Java actually. That's the business model of Gluon:
It's a combination of JavaFX, a custom controls library that implements Material Design and GraalVM native image. Whether you want a non-native UI toolkit on iOS is a separate matter, but it can be done technically.
In fact, you can ship JavaFX apps to the web too. It doesn't compile to megabytes of JS either - instead, the JavaFX app runs on the server and the UI is projected to divs and SVG elements on the fly. The browser provides native scrolling and text selection. If you have low latency to the server (e.g. same continent) it can work remarkably well. Check out https://www.jpro.one/ - the entire website is a JavaFX app.
I think you’ve got to meet your customer where they are, and if you can ship Java desktop apps, and they’re happy… keep going.
But you’re not shipping apps to their iPhones using Java. It’s either JS or Swift.
And, on Android it’s JS or Kotlin.
So the common target is JS.