Psellos
Life So Short, the Craft So Long to Learn

OCaml iOS Simulator App “Gamut” Updated for Lion

May 14, 2012

I updated the basic OCaml iOS Simulator example app, Gamut, to build under Lion with the latest Xcode. If you’re interested in running OCaml on iOS, building this app and running it in the iOS Simulator is an easy way to get started. There’s also a binary version that you can run in the simulator just by clicking on it.

iPhone running Gamut app

Gamut is a simple app that shows an animation with colors that change as you touch the screen. The accompanying screenshot shows what it looks like—but imagine that the colors are changing hypnotically.

The update makes no changes to the OCaml and ObjC code—Gamut only uses parts of iOS that haven’t changed since iOS 3.1. However, I spent some time making it easier to try out the app. I built a launcher app that lets you run Gamut in the iOS Simulator with just a few clicks (no command line). I also repackaged the sources so you can build and run in the simulator under Xcode with just a few clicks.

An advantage of using Xcode is that it’s the supported way of running apps in the simulator. For those who actually like to work from the command line (as I often do) the instructions also show how to build and run the app that way.

Internally, the launcher app uses the runsim script that I described in a recent blog post Run iOS Simulator from the Command Line. I used Platypus (a really nice free Mac app) to transform runsim into a Mac app. In a day or two I’ll write up a small description of how to do this.

As always, the previous version of Gamut is still available in the OCaml Programming Archives.

Posted by: Jeffrey

Comments

blog comments powered by Disqus