Skip to content

* [proof of concept] support for RoboVM/JVM on iOS(arm64) platform that enables Compose there - #1259

Draft
Demyan Kimitsa (dkimitsa) wants to merge 1 commit into
JetBrains:release/0.144from
dkimitsa:robovm-v0.144.6-pr
Draft

* [proof of concept] support for RoboVM/JVM on iOS(arm64) platform that enables Compose there #1259
Demyan Kimitsa (dkimitsa) wants to merge 1 commit into
JetBrains:release/0.144from
dkimitsa:robovm-v0.144.6-pr

Conversation

@dkimitsa

Copy link
Copy Markdown

hello,
this PR demonstrates ability to run skiko and compose on iOS using RoboVM/JVM target that allows to use Java ecosystem with compose application. disclaimer and sorry:

  • intentionally targeted wrong release as POC was done around v0.144.6 that matches compose 1.11.0 release;
  • it is not intended to be merged, I completely understand that it is not going to be maintained by JetBrains team;
  • can be closed as soon as required. intended to demonstrate ability to use it with officially not supported platform.

most changes was done to buildSrc infrastructure to incorporate RoboVM target with following changes:

  • use JVM skia bindings;
  • exclude AWT code (not available on robovm);
  • port native/iOS SkiaLayer/View using RoboVM bindings while maintaing existing logic.

test work without issues, library packs binary into recognisable RoboVM format and pushed to sonatype for quick demo.

  dependencies {
      implementation("io.github.dkimitsa.robovm:skiko-iosrobovm:0.144.6-SNAPSHOT")
  }

compose

it is possible to run compose-desktop using this skiko on iOS, few tweaks to be done (like skiko-awt to be excluded, missing actuals that are picked from awt to be provided through mock files).
tweaks and Compose Destop dependency management grouped into single interop library:
https://github.com/dkimitsa/robovm-compose-interop

ready to use sample

https://github.com/dkimitsa/codesnippets/tree/sample/compose-demo-app

preview in IntelliJ IDEA

it will not work with it directly but there is way to create multi platform compose app and use desktop/android preview in shared module as explained here

buildSrc infrastructure adapted to host `iosRobovm` target.
idea implemented: use same approach as Kotlin/Native for iOS but use RoboVM CocoaTouch bindings.
code adapted with minimal changes where possible to keep logic same as in Kotlin/Native for iOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant