Search code examples
gluongluon-mobile

How to change version of RoboVM compiler to 2.3.10-SNAPSHOT in Gluon Mobile


I have an issue with running my JavaFX/Gluon Mobile App on iPadOS 13.3 Actually the similar issue is described here: Gluon sample application failing on ios devices I've identify that the problem is caused by RoboVM and should be fixed in the version 2.3.10-SNAPSHOT

How can I change the version of RoboVM used by Gluon? In the Gluon documentation is mentioned the ios gradle extension property robovmVersion. This property can be set to the version robovmVersion ='2.3.5-ios12' but not 2.3.10. The reason is that on the bintray there is no version 2.3.10.

Is there any way to force Gluon Mobile to use RoboVM 2.3.10?


Solution

  • This is a temporary solution until the JavaFXPorts repository gets updated. There seems to be an issue with iOS 13.3 and JavaFX native libraries that's why apps crash even when using the latest 2.3.10-SNAPSHOT.

    The breaking line of code was identified yesterday by Demyan Kimitsa who suggested to remove assert from the following native class

    GlassApplication.m:635

    assert(pthread_key_create(&GlassThreadDataKey, NULL) == 0);
    

    becomes

    thread_key_create(&GlassThreadDataKey, NULL) == 0;
    

    I have created a build with the above change in native libraries and with the use of RoboVM 2.3.10-SNAPSHOT everything runs normal again even in the latest iOS.

    Now that the issue is identified, I believe it is a matter of time until a new JavaFXPorts fix is published.

    If you can't wait, you can download the HelloWorld sample with the new binaries from here. Adjust the parameters in build.gradle and you are ready to go.