Events

Building Bridges with Windows 10

May 19, 2015

  • Justin Magnini Justin Magnini

Microsoft had a lot of exciting announcements over the course of the Build Conference this year. A big focus was on Windows 10 and the Universal Windows Platform (UWP). Available sometime this summer, Microsoft is projecting that Windows 10 will be available on one billion devices. Having your app available to one billion devices is a huge opportunity, especially if there is minimal effort required to get there.

One of the ways Microsoft is allowing developers to take advantage of this opportunity is by providing a number of bridges to take an existing app to the Windows Universal Platform—apps from the web, legacy .net, Win32 apps, and even from iOS and Android. That’s correct: Microsoft is allowing iOS and Android developers an easy way to take their existing apps to the Universal Windows platform. Let’s look at how this works with Project Islandwood and Project Astoria.

Building Bridges with Windows 10

What is Project Islandwood?

Project Islandwood lets you write Windows universal apps using Objective-C. The Objective-C support includes both a compiler and a runtime. This means that you are writing a Windows app; t’s not running in any kind of emulator or virtual machine. It will work across all Windows 10 devices. This allows you to deploy to more devices, across multiple form factors, running ARM and x86/64 CPUs.

So how does this work in practice? Microsoft has created a tool that, when provided with an iOS Xcode project, will generate a Visual Studio project. The Xcode and Visual Studio project files sit side by side and can share codebase and resources. The converted Windows universal app is not limited to fixed screen sizes, and the app can be customized for a better Windows experience without the iOS version suffering as a result. The iOS API compatibility layer only supports a subset of iOS APIs, though. It also does not track a particular version of iOS. The most-used APIs are implemented first, and Microsoft is looking for developers to tell them which APIs should be added. Here are some things that are currently supported:

– Games: OpenGL, CAEAGLLayer, EAGLContext, OpenAL, sensors
– User Interface: UIKit, CoreAnimation, CoreGraphics, CoreText, Touch, Storyboards, nibs, autolayout
– Objective-C: ARC, blocks
– Foundation/CoreFoundation
– Services: StoreKit, notifications
– iOS concepts translated and redirected to Windows concepts

Windows does the heavy lifting for you. File system paths are mapped automatically, and you don’t have to reorganize your assets or change the code to look in different places. Notifications will appear as Windows notifications and will automatically appear in the Action Center. Despite still using Objective-C code, developers can freely consume the Windows API for things such as Xbox Live, Cortana, or any other Windows API feature normally available to a universal app.

Project Islandwood has already seen success with Candy Crush Saga, which started with the original Objective-C source and was compiled and repackaged for Windows Phone. The SDK for Project Islandwood will be rolling out sometime this summer. Swift support is coming, too.

Project Astoria

Project Astoria is the same concept, but applied to Java/C++ code. You can continue to use your Java/C++ code and continue to use the Android IDE of your choosing. This allows for faster development and high code reuse. The entire workflow also works on a Mac. One thing to consider, though, is that Project Astoria is currently only available for Windows 10 mobile. This means no desktops or tablets for now.

Bring Your Code to Windows, Wherever it Started

Like with Project Islandwood, Windows does the heavy lifting for you. Android concepts are translated and redirected to Windows concepts. Controls have been recreated. Experiences and UX have been made to match the Windows experience. Even fundamental concepts like lifecycle are automatically mapped for you.

Apps built with Project Astoria have good performance and long battery life. They run directly on top of the Windows kernel. Additionally, each low level call is redirected to the Windows kernel. Users also benefit from the Windows security model. The Store ingestion process screens apps, and the apps run in the Windows universal app sandbox. This does means that apps will have less freedom to run fully in the background unchecked or access system settings. Android apps that require access to system settings are thus not a good fit for Project Astoria.

Microsoft is providing an App Analysis page, which is going to be part of the Windows Development Center, that will allow developers to upload an Android APK and have a static analysis performed on it to find out what changes will need to be made. This service provides a list of recommended changes and converts some Google services automatically into their Microsoft counterparts. The app icons can even be converted into Windows universal app icons if desired.

Getting Started

Some of our developers are now building Windows Universal apps. We’re finding that Microsoft has done a great job of supporting cross-platform portability through the unification of the OS and by creating excellent development tools and coding extension that facilitate this work.

Project Islandwood and Project Astoria will both be available for free. They are expected to be available sometime in the coming months.

To sign up for preview access visit the Islandwood site or Project Astoria site.