Compile Arduino Code on iOS

Is it possible to compile code written for Arduino on iOS?

I would like to be able to create a native iOS app that will let the user write an Arduino sketch, and then compile it to HEX code that can be uploaded to the Arduino board.


The key part is getting avr-gcc to run,
Found this after some googling,

down the bottom of the thread, it seems someone had some luck.