Microsoft open sources (most of) its iOS-apps-on-Windows compatibility layer
Back at its Build developer conference in April, Microsoft made the surprising announcement that it was creating a way for iOS and Android developers to port their apps to Windows. For iOS programs, this is achieved using a set of libraries and development tools that together are codenamed “Project Islandwood.”
Microsoft announced today that large parts of Project Islandwood are being open sourced. The first code release is available on GitHub right now, published under the liberal MIT license. With it, Objective-C programmers can write Universal Windows Apps that’ll run on Windows and, soon, Windows Mobile, Xbox, and even the HoloLens augmented reality headset.
Islandwood has a few components, and only some of them are being released as open source. The entire Islandwood stack has four parts: an Objective-C compiler, an Objective-C runtime, iOS libraries providing Windows-based implementations of iOS APIs, and Visual Studio integration. It’s the middle two—the Objective-C runtime and the iOS API implementation—that are being released as open source.
Microsoft’s goal for Islandwood is to give iOS developers full access to the Windows platform. Apps developed with Islandwood aren’t sandboxed or run in some kind of iOS virtual machine; they’re full-on Windows programs, albeit using an unusual programming language and with a big library providing an unusual set of APIs.
This means that Objective-C developers will be able to use the WinRT API framework that made its debut with Windows 8. To do this in a way that will be natural to Objective-C developers, Islandwood extends the projection system used in WinRT. Projections map the core WinRT to a version that’s appropriate to the norms and conventions of different languages; in Islandwood this includes, for example, mappings between WinRT’s HSTRING strings to iOS’s NSString. Both Objective-C objects and WinRT objects will also share the same reference counting system.
The big part not released as open source is the hybrid compiler that is used to build Islandwood applications. This compiler takes the Objective-C front-end from the clang compiler and bolts it on to the code generating the back-end of Microsoft’s cl compiler.
The code is currently in quite an early state. It includes, for example, portions of the UIKit library used for building iOS interfaces, parts of QuartzCore (formerly Core Animation) used for animation, and pieces of the CoreAudio audio framework. Microsoft intends to build this out to make Islandwood more complete and capable, and feedback from the community will likely guide the development direction. Future development will include the creation of Windows versions of the Grand Central Dispatch library that has proven popular for multithreaded OS X and iOS development.
A stable release of Islandwood and its Visual Studio integration is currently planned for the fall. At around the same time, Microsoft intends to release a public beta of Project Astoria—a system for running Android applications on Windows Mobile. Project Centennial, a system for packaging existing Win32 applications using App-V virtualization so that they can be distributed and updated in the Windows Store, will enter public beta next year. Project Westminster, used for packaging Web apps for promotion through the Store, is available now.