post header image for Game of Life HaXe & NME on iOS

Game of Life HaXe & NME on iOS

13th October 2011

For the last few days I have been playing around with trying to get the game of life sample from my previous post working on the iPhone using haXe with NME.

In theory NME should do all the heavy lifting for you so that it should be as simple as running:

[code lang="text"]

haxelib run nme build nmebuild.nmml ios


Unfortunately however when I ran this I was getting rather cryptic errors:

[code lang="text"]

Called from ? line 1
Called from InstallTool.hx line 384
Called from a C function
Called from InstallTool.hx line 70
Called from a C function
Called from installers/InstallerBase.hx line 61
Called from installers/InstallerBase.hx line 668
Called from installers/InstallerBase.hx line 762
Called from haxe/xml/Fast.hx line 59
Uncaught exception - icon is missing attribute name


I had read from the NME documentation page that this may have been fixed in the more reccent versions of NME. So I downloaded the beta version (you could checkout from SVN too if you wish) and told haxelib that im going to be working with a development version of NME with the following command:

[code lang="text"]

haxelib dev nme /Users/mikec/Documents/NME_3.1_Beta


Now when I try to build for ios I get success!

From there is a simple matter of opening the generated xcode project, connecting my iphone and hitting run:

I really like how easy the workflow is compared to the Adobe Air packaging system. Generating the xcode project makes things so much faster.

If I can get my hands on an Android phone next I think im going to have to have a go at getting this sample working on there too!