As I’m learning Objective-C I find moving between the terminal and my favorite IDE, Editra, kind of annoying. Luckily Editra has a really cool plug-in called Launch that can be configured to run code and display the results within the editor. The only problem is that compiling and running objective-c doesn’t work for a couple of reasons. No big deal, I wrote a simple command line program to compile and run the code returning any output. This will work on the command line and I also use it in Sublime Text 2 .
This little app was compiled on Lion so some minor changes may need to be made to compile for Snow Leopard or older. Source is included and I even compiled this in Editra.
There are two versions, one simple compiles and the other compiles and executes the program and returns results if any. This can be used at the terminal giving it only the script you wish to compile. See the images below for Editra and Sublime setups, changing to your path of course. This is for simple scripts (.m) for simple programs and learning, I’d use XCode for serious dev.
Easy Compiler (runObjC.zip) SHA1: 2ea6a435c2e666b13ab4d60d20b6f30c0218e4f0