Journal for May 2011

Speaking at DevTeach

This week I'm going to be presenting two sessions at DevTeach 11 in Montreal.

My first topic will be Native .NET Apps for the Mac with MonoMac. I'll be taking about MonoMac and the native Mac APIs that it exposes to .NET developers, and how to build native apps that can be deployed to the Mac App store. My second topic will be Using Mono for Native Apps on Mac, Android, iPhone and more. I'll be giving an overview of Mono's most exciting platform integration technologies: Mono for Android, MonoTouch (iPhone), and MonoMac. I'll also explore strategies to share and re-use code between these and other .NET platforms such as Windows, Silverlight and Windows Phone 7.

I'll also be on the DotNetRocks panel to discuss mobile platforms, and outside my talks I'll be happy to discuss any Mono-related topic, especially the technologies I've worked on — MonoDevelop, MonoTouch, Mono for Android, ASP.NET MVC, and the use of Mono in games.

Preview of Xcode 4 Support for MonoTouch

In their recent update of the iOS and Mac developer tools, Apple removed the standalone Interface Builder application and integrated the GUI designer functionality directly into Xcode 4. This was a very significant change and removed several features that were necessary for MonoTouch and MonoMac to integrate with the designer. As soon as Xcode 4 went final, we started working on MonoDevelop support for integrating MonoTouch with Xcode 4's GUI designer, but it's a complex project and will take some time to complete.

For now we recommend using Xcode 3's Interface Builder, which can easily be done even while having Xcode 4 installed. However, I understand that many people are concerned how Xcode 4 will be better supported going forward for MonoTouch and MonoMac, so I've made a screencast to introduce MonoDevelop's upcoming Xcode 4 integration and demonstrate how it works.

MonoTouch integration with Xcode 4

Although XIB files can be opened standalone in Xcode 4, this isn't very useful, as it's no longer possible to define custom types, outlets and actions within the interface designer. Instead the designer is aware of the Objective-C types defined in the Xcode project that contains the XIB file. This means that we have to generate an Xcode project file and synchronize it with the MonoDevelop project. Since Apple doesn't support writing third-party Xcode plugins, we can't make the Xcode designer directly aware of types defined in C# source, so the generated Xcode project also has to contain Objective-C stubs for all the types defined in C#. The Xcode designer now modifies the Objective-C source files when adding outlets or actions, so those changes need to be synchronized back the the MonoDevelop project.

The new model of Xcode integration resolves several outstanding issues in the previous Interface Builder integration. Because the generated project contains all bundle resources (Content and Page files) from the project, they will now be accessible directly from the GUI designer. In addition, all user-defined types are accessible from the designer, not just those defined for the current xib file.

Obviously, synchronizing files and types between two projects in separate applications is complex, and if anything goes wrong it's possible to lose data, so we want to make sure it's as reliable as possible before we release it. We hope to be able to offer a beta of this functionality within the next few weeks.