Psellos
Life So Short, the Craft So Long to Learn

Updated OCaml Compiler for iOS Simulator

July 15, 2011

I’ve just updated OCamlXSim, my build of the OCaml compiler for running iPhone and iPad apps in the iOS simulator. It’s now based on OCaml 3.12.1 (the very latest version). I also found a way to make more of the supporting tools work; for example, ocamlmklib now works for the Simulator environment.

If you’re interesting in trying OCaml on iOS, this is a good way to get started. You don’t need a device, or need to register with Apple as an iOS developer. In fact it’s a great tool for doing OCaml/iOS development. It gives you quicker compile/test turnaround, and (as I discovered this week) it allows you to try out your touch interface with more accuracy. When using an actual device, it’s often difficult to tell just where you are touching the screen. In the simulator, this is much easier.

If you just want to try out OCamlXSim, I made a standard release package for it (warning: this is a 45 MB file). I also updated the description of how to build it yourself, and how to test it. The description is here.

To possibly pique your interest further, the above description of OCamlXSim shows how to run applications in the iPhone/iPad Simulator from the command line through an undocumented interface!

There are also two apps that are packaged to run directly in the Simulator. There is a simple one called Gamut, and a little more complex one called Voronoi (pictured at the left).

Posted by: Jeffrey