There seems to be a real movement afoot to provide means for developers to write native or near-native phone applications in ECMAScript. PhoneGap is doing it, Rhomobile is doing it, Palm Pre is doing it, and now Haxe is doing it.
HaXe has always been an interesting project. It’s basically a JavaScript compiler with targets for Flash 6-10, PHP, C++, Java, etc. Now you can write HaXe projects for the iPhone. Pretty cool stuff. This is certainly along the lines of PhoneGap in that it helps democratize the platform – however – I suspect it probably violates the iPhone terms of use in that it basically becomes an interpreter:
Usage of such non-public API, as outlined in the iPhone SDK Agreement section 3.3.2 is prohibited:
"An Application may not itself install or launch other executable code by any means, including without limitation through use of a plug-in architecture, calling other frameworks, other APIs or otherwise. No interpreted code may be downloaded and used in an Application except for code that is interpreted and run by Apple’s Published APIs and built-in interpreter(s)."
This seems to be sortof the same problem suffered by apps written using the popular phone framework PhoneGap (http://ajaxian.com/archives/someone-at-apple-please-review-stance-on-phonegap). While I see the need to control how code is executed when running outside the normal security sandbox of a browser, HaXe seems fairly tame because as far as I can tell, the application code is not being altered after the program is compiled (could it??). In any case, you’re still compelled to operate within the same runtime sandbox as a normal Objective-C based application.
In any case, if Apple is going to continue to crack down on frameworks like this, I hope they pick on the way the wind is blowing and provide something to the community that lets people marry the familiar world of ECMAScript, HTML, and/or CSS with the powerful features of the iPhone.