Home Features Docs Blog Support GitHub

Moe + Libgdx -> Build successful, initializeForView working -> no ApplicationAdapter method called anyways

(Christian Ringshofer) #1

Hi there!

I’ve got the next issue which came up today:

I added all stuff necessary for executing libgdx applications via ios GLKViews.
I’ve added the gradle parts necessary for the implementation:

configurations { natives }

implementation "com.badlogicgames.gdx:gdx-backend-moe:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"

the copyNatives task, xcode build properties, frameworks, and so on.

Now the core of the problem:

I wanted to initialize the libgdx for a GLKView and using the viewDidLoad function to hook in the initialisation as I should:

IOSApplicationConfiguration configuration = new IOSApplicationConfiguration();
myIosApp = new IOSGLKViewApplication(new MyIOSApp(), configuration);
System.out.println("created ios application");

Everything seems almost perfectly fine! The viewDidLoad is being called, the IOSGLKViewApplication is being created, there’s nothing crashing, even the debug message (“created ios application”) is printed out.

Now the weird part:
None of LibGDX’s ApplicationAdapter method is being called, therefor the libgdx code does not “start”!
(created, paused, resumed, disposed, etc.)

I’m currently using LibGDX 1.9.8, the latest MOE version 1.4.0 and Gradle 3.0.+

Does anyone know how to solve this? I appreciate every help!

(Roland Vigh - Migeran) #2


Please try his sample: IOSGLKViewApplication.zip (742.8 KB)

Best Regards,

(Christian Ringshofer) #3

Thanks for the reply! But it did not solve the issue. Since I used the example project for the integration in the first place.
Now I’m facing the issue

No implementation found for void com.badlogic.gdx.backends.iosrobovm.IOSGLES20.init()

Which is also known in the forum as I’ve seen :frowning:

Is there a trick I could use somehow? Like recreating an empty moe-xcode project and copy some files?

(Christian Ringshofer) #4

Okay a friend of mine helped me out and we came to a simple solution which was not as obvious in the first place.

Since your example does implement the GLKView for the ViewController which is also the initial ViewController the GLKView would initialise directly when the App starts.
But in my case the ViewController on which the GLKView should start was not the initial one. After copying everything from your example to my project and it still did not work we came to the solution that onDrawRectangle in the callback methods would not be called anytime.

After checking the setNeedsDisplay checkbox in the InterfaceBuilder it worked like a charm.