The latest Xamarin update, which brought us Mono 3.0, breaks our libgdx iOS backend. More precisely, it breaks the IVKM Monotouch port by Michael Bayne, on which we rely to run our JVM bytecode on iOS. Michaels already working fixed up most things, but there are still some bumps on the way to a fully working version, which requires the assistance of Xamarin.
Seeing how every update of Xamarin breaks our iOS backend, i can no longer promote this solution with good conscience. My skills and time budget are insufficient to support Michael, and not being able to fix things myself makes me really uncomfortable. The code i contributed to IKVM Monotouch was trivial compared to what Michael pulled off.
For this reason i’m announcing the deprecation of the Xamarin based iOS backend. Here’s how that will go down:
- We’ll push out the 0.9.9 release in the coming weeks, containing the stable IKVM monotouch port that is compatible with the previous release of Xamarin iOS (220.127.116.11).
- We’ll tag the release as always, the remove any signs of the Xamarin backend from the repository as well as our build system. This will simplify our build considerably
- We’ll create a replacement for the setup-ui, which is long overdue, and update the documentation were necessary.
- If you are currently working on a game, you should avoid updating to the latest Xamarin iOS version. Stick to libgdx 0.9.8, or the upcoming 0.9.9, or any nightly release in between those two versions.. If you already updated Xamarin iOS, you can downgrade to a working version (18.104.22.168 pkg) as discussed in this issue.
- We will start packaging the RoboVM backend starting with 0.9.9, which should now have feature parity with the Xamarin backend, thanks to a metric ton of hard work by Niklas Therning, creator of RoboVM. You should be able to “port” your game to that backend without huge problems (ymmv).
Here are the pros and cons of this change:
- Performance of RoboVM is not yet on par with Xamarin. It should be sufficient for many games. I’m in the process of setting up a benchmark suite to quantify this
- Debugging is currently not supported in RoboVM. You will have to resort to printf.
- No RoboVM apps on the app store yet, at least to my knowledge. However, RoboVM compiles to native code, like Xamarin (and by proxy Unity), or Flash, and it’s unlikely that Apple will reject apps compiled through RoboVM.
- Less layers of abstractions, RoboVM is a dedicated VM running (native, ahead-of-time compiled) bytecode.
- Full class library support, it supports the same Java classes Android supports (minus the Android specific APIs of course).
- IDE & Maven integration, the former being currently limited to Eclipse. You work just like with desktop, Android or GWT projects.
- Incremental builds, no more multi-minute waits to deploy to a real device
- Entirely Free and open-source, you still need a Mac and an Apple developer’s license though. Direct complaints towards Apple HQ.
This is not a choice made lightly. I believe our deprecation measures are adequate, please speak out if you disagree. Overall i believe this change to be positive and i hope you share this thought with me.
I’d also like to state that this is in no way the fault of Xamarin. IKVM Monotouch is a (brilliant) hack, that just happened to work really well. It does not make financial sense for Xamarin to support this “use case”. We’ve received support from Xamarin in form of free licenses for 3 developers, for which we are greatful. They’ve also actively participated with comments and suggestions in the early phases of our iOS backend effort.