Hi,
I am trying to get my first gradle build for mx JFX iOS app to run.
I set up the code as in the Contractr FX iOS example, i.e.
---
public class MyIOSApp extends UIApplicationDelegateAdapter {
public static class MyIOSJFXApplication extends MyJFXApplication{
...
}
..
public boolean didFinishLaunching(UIApplication application,
UIApplicationLaunchOptions launchOptions) {
Thread launchThread = new Thread() {
@Override
public void run() {
Application.launch(MyIOSJFXApplication.class);
}
};
launchThread.setDaemon(true);
launchThread.start();
return true;
}
public static void main(String[] args) throws Exception {
try (NSAutoreleasePool pool = new NSAutoreleasePool()) {
UIApplication.main(args, null, MyIOSApp.class);
}
}
}
---
The error I get launching is:
Error: MyIOSApp is not a subclass of javafx.application.Application
Of course it isn't because it's the UIApplicationDelegateAdapter implementation.
In my gradle build file I have this:
apply plugin: 'org.javafxports.jfxmobile'
mainClassName = 'my.package.MyIOSApp'
Now, it looks as if the mainClassName is that what is checked for being a subclass of javafx.application.Application, which I find surprising, because I thought the Application class was specified programatically in the code above.
Am I confusing things here?
Is there any example of a working JFX iOS gradle build setup? In the robovm samples I could only find Contractr but that is maven-based.
And I am still unsure if the jfxmobile and the robovm plugin and are alternatives for each other and I am mixing up stuff here. If robovm can do that for me, i.e. build an iOS JFX application, I want to do it the robovm way but where can I find how?
Thanks,
Robert