Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?!

like image 695
Wayne Shelley Avatar asked May 01 '14 13:05

Wayne Shelley


2 Answers

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 :)

like image 71
Syeda Zunaira Avatar answered Sep 18 '22 20:09

Syeda Zunaira


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

like image 30
Ryan Kreager Avatar answered Sep 19 '22 20:09

Ryan Kreager