The Mono guys released their first preview of MonoTouch, their implementation of the Mono tool chain for building iPhone apps.

Now, as anyone following this blog knows that i’m pretty deep into “native” Mac and iPhone development at this time, and i love Xcode and Objective-C too much to even consider switching to a third party platform for my OS X work – but none the less, i felt tempted to try out how it works with Delphi Prism, and am happy top report that i was able to port and compile their hello world sample app just fine in Prism (using the compiler we’re shipping for the August release).

Now, i wasn’t able to actually run the app on the phone, because some parts of the MonoTouch tool chain apparently don’t work on Snow Leopard (which i’ve been running exclusively since WWDC) yet – but hey, it’s all IL. If it compiles in Prism, it should run just like the C# version does.

Here’s the ported code:

namespace MonoTouch;   interface   uses System.Drawing, System.Linq, MonoTouch.UIKit;   type AppController =class(UIApplicationDelegate)private fWindow: UIWindow;publicmethod FinishedLaunching(app: UIApplication);override;end;   Demo =classpublicclassmethod Main(args:arrayof string);end;   implementation   classmethod Demo.Main(args:arrayof string);begin UIApplication.Main(args,nil, "AppController");end;   method AppController.FinishedLaunching(app: UIApplication);begin fWindow :=new UIWindow (UIScreen.MainScreen.Bounds); fWindow.AddSubView(new UILabel(new RectangleF(50,50,230,100), Text :='Hello from MonoTouch with Delphi Prism')); fWindow.MakeKeyAndVisible();end;   end.