lib GDX 1.6.1

This release contains a major change to the build system. I had to change the way the iOS project handles native libraries. Up until today, the ios/build.gradle file had a two tasks, copyNatives , and updateRoboVMXML . When you import your project into an IDE or build it via the CLI, these tasks will walk through all dependencies, extract the static libraries and rewrite your robovm.xml file. That’s not really nice.

This release fixes this long standing issue. iOS native libraries, e.g. for gdx code, freetype, bullet or box2d, are now packaged using RoboVMs Jar layout for native libs. The static libraries are stored inside a jar, in the directory META-INF/robovm/ios/libs . Additionally, a small robovm.xml file is stored in META-INF/robovm/ios/robovm.xml . This file specifies the native libraries in the libs directory that RoboVM should link.

If you update an existing project to libGDX 1.6.1, you need to make a few changes to the build.gradle and ios/build.gradle files of your project!

In the root build.gradle file, you will see something like this for the iOS project:

project(":ios") { apply plugin: 'java' apply plugin: 'robovm' configurations { natives } dependencies { compile "org.robovm:robovm-rt:${roboVMVersion}" compile "org.robovm:robovm-cocoatouch:${roboVMVersion}" compile project(":core") compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 project ( ":ios" ) { apply plugin : 'java' apply plugin : 'robovm' configurations { natives } dependencies { compile "org.robovm:robovm-rt:${roboVMVersion}" compile "org.robovm:robovm-cocoatouch:${roboVMVersion}" compile project ( ":core" ) compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" } }

You need to change the natives config name to compile, just like what we use for the normal Java dependencies.

In the ios/build.gradle file, can remove the copyNatives and updateRoboVMXML tasks and any other line that references those tasks. You should end up with something like this (modulo your main class name!):

sourceSets.main.java.srcDirs = [ "src/" ] sourceCompatibility = '1.7' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' ext { mainClassName = "com.mygdx.game.IOSLauncher" } launchIPhoneSimulator.dependsOn build launchIPadSimulator.dependsOn build launchIOSDevice.dependsOn build createIPA.dependsOn build eclipse.project { name = appName + "-ios" natures 'org.robovm.eclipse.RoboVMNature' } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 sourceSets . main . java . srcDirs = [ "src/" ] sourceCompatibility = '1.7' [ compileJava , compileTestJava ] * . options* . encoding = 'UTF-8' ext { mainClassName = "com.mygdx.game.IOSLauncher" } launchIPhoneSimulator . dependsOn build launchIPadSimulator . dependsOn build launchIOSDevice . dependsOn build createIPA . dependsOn build eclipse . project { name = appName + "-ios" natures 'org.robovm.eclipse.RoboVMNature' }

After this changes, simply set the gdxVersion in your root build.gradle to “1.6.1” and you are done.

Here are the full CHANGES for this release:

[1.6.1] - Added optional hostname argument to Net.newServerSocket method to allow specific ip bindings for server applications made with gdx. - Changed the way iOS native libs are handled. Removed updateRoboVMXML and copyNatives task from ios/build.gradle. Instead natives are now packaged in jars, within the META-INF/robovm/ios folder. Additionally, a robovm.xml file is stored there that gets merged with the project's robovm.xml file by RoboVM. 1 2 3 [ 1.6.1 ] - Added optional hostname argument to Net . newServerSocket method to allow specific ip bindings for server applications made with gdx . - Changed the way iOS native libs are handled . Removed updateRoboVMXML and copyNatives task from ios / build . gradle . Instead natives are now packaged in jars , within the META - INF / robovm / ios folder . Additionally , a robovm . xml file is stored there that gets merged with the project ' s robovm . xml file by RoboVM .

ROBO PODS

In other news, if you are interested in libGDX plus iOS you should cast your vote for RoboPods. RoboPods are bindings to 3rd party libraries like Admob, Google Play Game Services and so on that we at RoboVM will officially support going forward. See this blog post, including the poll.

Happy Coding!