Thursday, June 19, 2014

iOS & RoboVM

Well, thanks to my office-mate Tim, I have an old nearly-useless iphone 3g that I decided to see if I could get Robo-Ninja running on. LibGDX can build to iOS using RoboVM, so as much as I doubted it would work, it sounded fun to try. (RoboVM is a tool for compiling java code down to iOS native code, the similarity in naming is purely coincidental)

Step 1, since I'm not interested in paying Apple a $100 yearly subscription to run my code, was to jailbreak the phone. That was painful enough, searching for information and jailbreak files for a phone that old. Piles of broken links and outdated information.

Then I had to borrow a Mac laptop, since it will only build on a Mac. I installed RoboVM and all the necessary tools, and relatively quickly got Robo-Ninja running in the iOS simulator. It was a little slow, but it was Robo-Ninja!

The next hurdle was figuring out to build the ipa file (the iOS app package file, equivalent to the apk files in Android) without actually signing it with a developer certificate. At first, it kept breaking because I didn't have an apple  developer account. It took about an hour of googling, but there's a newly-added flag in RoboVM that lets you skip signing. So I finally got the ipa built.

Then a good 30 more minutes futzing with the ancient jailbroken phone to figure out how to manually install an unsigned ipa file, only to find out what I suspected: I needed at least iOS 5, and this thing is stuck at 4.

Ah well, it was worth a try.  Supposedly there's a few hacks that can allow an iPhone 3g to upgrade to iOS 5, so I may try one of those for fun. Until then, if anyone has a jailbroken iphone on iOS 5 or greater, and is interested in helping me see if Robo-Ninja will run on there, let me know.

Until then, I'll keep chugging away at the game. I'm working on the factory/industry area now, trying to get the tilesets and background put together. I realized today, looking at my rough pencil sketch of the world map, that I'm about 1/3 done with the level design. And probably at least 75% done with the codebase. So I'm getting there!

2 comments:

Dumitru-Alin Simoiu said...

Hi! I am in about the same situation with Mac running in virtual box and a deep, unexplained desire to see libgdx running on the forbidden device XD (iphone 4s, 7.1.2, jailbroken) . I can deploy from xCode using Jailcoder but from eclipse with libgdx and roboVM I had no chance. What is the setting for roboVM to skip the code signing? ( I am not registered as developer :P ). *just found your blog while searching for solution, really cool articles here :D

Nathan Tolbert said...

Hi! If I remember correctly (I don't have the code in front of me -- it's on a borrowed mac!), if you're using the libGdx gradle build scripts, you can add a robovm section, and set "iosSkipSigning" to false:

robovm {
iosSkipSigning = false
}

See the example in their usage on the front page of their github project:
https://github.com/robovm/robovm-gradle-plugin

PRGE 17

I just realized I never did a post after the Portland Retro Game Convention talking about how great it was! The first great part was just ...