Error when compiling project for iOS

Hi guys,

Just wanted to test jME for fun, I didnt try it in a long time.
I saw there was iOS support, but it’s not working over here. I did everything they said in the wiki (https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:ios)
I used just the original jME platform, updated modules and went straight for installing iOS plugin. Also reinstalled once to check again.

The error I got was when I tried to build my project (with project I mean just a created project based on the BasicGame template - no changes made)
This was the error (in the ide) after building:

[java]
/Users/Pet0r/Documents/Projects/jMonkeyProjects/BasicGame34/ios/src/JmeAppHarness.java:4: error: package com.jme3.input.ios does not exist
import com.jme3.input.ios.IosInputHandler;
/Users/Pet0r/Documents/Projects/jMonkeyProjects/BasicGame34/ios/src/JmeAppHarness.java:21: error: cannot find symbol
protected IosInputHandler input;
^
symbol: class IosInputHandler
location: class JmeAppHarness
/Users/Pet0r/Documents/Projects/jMonkeyProjects/BasicGame34/ios/src/JmeAppHarness.java:71: error: cannot find symbol
input = (IosInputHandler)iosContext.getTouchInput();
^
symbol: class IosInputHandler
location: class JmeAppHarness
3 errors
/Users/Pet0r/Documents/Projects/jMonkeyProjects/BasicGame34/nbproject/ios-impl.xml:5: The following error occurred while executing this line:
/Users/Pet0r/Documents/Projects/jMonkeyProjects/BasicGame34/nbproject/ios-impl.xml:73: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)[/java]

Some other info:

  • Mac Mini
  • OS X 10.9.2
  • Xcode: Version 5.1 (5B130a)
  • iOS SDK: v7.1 (only option I had to choose from)

Does anyone know what this is? I tried a lot to work it around but couldnt find it. Thanks!

Make sure you have the latest SDK installed, the engine version is 3.0.7 by now for reference.

Edit: Wait… In the IDE? Just ignore the errors and try building.

That’s not going to work, if you mean by ‘ignore and try building’, to build the XCode project.
When I try that I get this error:

ld: -filelist file ‘…/…/build/ios-arm/libs.list’ could not be opened, errno=2 (No such file or directory)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I think that’s because the build in the IDE fails.

Also, just a general feedback: Maybe it’s a good idea to have a iOS section in the forum :wink:

Thanks!

Update:

Not sure if this is helpful, but I just added ios-base to the libraries, so I could look in the JAR, and I saw that there was no IosInputHandler. Not even com.jme3.input.ios package at all.
Not sure if that’s normal. (see screenshot)

Ah. Well, it doesn’t work with the current stable version because the input handler was added just a few days ago. You will have to wait until 3.0.8

Lol thanks, I’ll be patient!

You could also try to just comment out the input related java code in the app harness. Ofc you won’t have input but I guess you should be able to run an app.

Hi there, any news about this error?

Input handling is added in V 3.0.8. I think it should work out of the box now.

If you have a project where iOS was enabled already and you have issues getting the new code, remove the resources folder and re-enable iOS deployment.

What I did is, downloaded latest jME3 SKD for mac, set the plugin source for nightly build, updated everything, and installed iOS plugin, then created BasicGame, enable iOS plugin, and build. After this i’ve got this error.

@alexeyis said: What I did is, downloaded latest jME3 SKD for mac, set the plugin source for nightly build, updated everything, and installed iOS plugin, then created BasicGame, enable iOS plugin, and build. After this i've got this error.

Don’t use nightly, its not nightly and it doesn’t work.