You’ve probably heard that Apple does not allow any interpreted or run-time compiled programs on the iPhone. That’s why you don’t see Flash, C#, or Java used on the iPhone. Now, companies like Adobe and Novell are trying to do something about that. In a ZDNet Q&A, Joseph Hill, product manager for Mono at Novell explains their approach with MonoTouch.
The MonoTouch project lets you run Mono programs on the iPhone. Mono is an open source implementation of Microsoft’s .NET platform sponsored by Novell. Normally, .NET code written, for example, in C# runs inside of a virtual machine. The VM takes an intermediate form of the code called bytecode (or in the case of .NET, MSIL) and either interprets it or does a Just-In-Time compilation to native code as needed. Apple doesn’t allow that, so as Joseph Hill explains, Novell had to take a different tack.
Ed: Why does Apple allow .NET development with MonoTouch when they don’t allow Java development on the iPhone/iPad?
Joseph: Java (and other runtimes) are restricted from being deployed to the iPhone because an application cannot execute writable memory. Virtual machines like Java and .NET generate native code from bytecode at runtime, and then execute this code; however, for various reasons, the iPhone kernel will not allow this code to be executed. Mono’s Ahead-Of-Time (AOT) feature avoids this issue by generating all native code that the application could generate at runtime ahead-of-time, so the application deployed to the iPhone is a 100% native application.
Ed: Does Ahead-Of-Time compilation make some features of .NET unavailable?
Joseph: The primary feature that is lost to AOT compilation is Reflection.Emit. (Since this would generate code that could not be executed.) Normal reflection is okay.
Next: Do I still need a Mac? >





