Apple's iPhone is known for its Byzantine application approval process and somewhat insular platform. Undeterred by these challenges, Novell has succeeded in bringing Mono, its open source implementation of Microsoft's .NET framework, to the iconic device.
Novell announced Monday the official launch of MonoTouch, a new framework that allows application developers to build native iPhone software with C# and other .NET programming languages. It is designed to conform with the requirements stipulated by Apple for App Store eligibility. This will allow .NET developers to take advantage of their existing skills and potentially reuse some of their existing code when they build software for the iPhone.
MonoTouch applications will have a fully native look and feel and will be indiscernible from conventional iPhone applications.
Apple forbids the inclusion of mechanisms that enable execution of arbitrary third-party code. This rule effectively bars the use of nonstandard runtimes, JIT engines, and bytecode interpreters. In theory, that seems like an insurmountable obstacle for intrepid developers who want C# on the iPhone. In practice, it turns out that this challenge is not impossible to overcome. The developers behind the Mono project use static compilation to bring C# to Apple's platform without falling afoul of the App Store rules.
Mono typically uses a just-in-time (JIT) compilation model where bytecode is translated into native machine code at runtime. But the compiler also supports an alternate model called ahead-of-time (AOT) compilation, which will convert .NET Common Intermediate Language (CIL) into native code at compile-time. This makes it possible for developers to statically compile their Mono-based applications into native executables that do not require a VM or any other specialized runtime components, thus meeting Apple's strict requirements.