Creating an iOS library or framework using libgdx (roboVM)

Is it possible to create an iOS library or framework using libgdx (RoboVM) that can be imported into Xcode?

Background: One of my colleagues has created a 3D visualisation app as a libgdx project for android and windows desktop. It can be compiled to run on iOS using RoboVM. However, I would like to wrap extra native user interface elements around it using Xcode. I know its possible to build the user interface programmatically via RoboVM but I would be keen to investigate if its possible to bring the existing work into Xcode. I don't need to edit the 3D visualisation component but add extra GUI elements around the 3D Vis window. I thought compiling the libgdx (RoboVM) code to a framework or library might be a solution that could be imported?!


Yes you can do it.

All you need to create a method, say initRoboVM(), This will be called by your code when you want to initialize libgdx. You'll need to pass the app path in, which you can hardcode when you're testing.

initRoboVM() will need some modifications, namely it should not call your Java app's main method, well, at least, that's what well behaving libraries should not do IMO. It should also not call rvmShutdown.

You can get further information from here

Thanks :)


I asked the RoboVM team directly. Their answer: It's not a native function, but it certainly can be done.

The complete message...

Hi,

Sorry for the late reply. This use case is not something we're going to do now. It is possible though if you're prepared to do some patching of RoboVM. Search the RoboVM Google Group and you should find others who have managed to get this working.

We get this request every know and then so we will add support for this eventually.

Regards, Niklas