A Computer Vision(ary) competition

I recently got interested in exploring the new wave of Computer Vision APIs out there, see what they can do and how to use them in my apps.
I obviously knew about Microsoft’s Cognitive Services (Computer Vision API) former Project Oxford but I wanted to see who else is in the space.
I picked the two most obvious competitors and decided to do a quick comparison: Google Cloud Vision, IBM Watson Visual Recognition.
So I explored all the options and tried to compare them at a high level.

–Update: Check part 2 for a more in depth feature comparison and part 3 for an analysis of the API itself.

Read More

Share Comments

Microsoft Bot Framework FormFlow Confirm

FormFlow is an awesome feature of Microsoft Bot Builder designed to let you easily create a form filling experience in your bot. There’s a lot of good official documentation but here’s one trick I found by checking the actual code (which it actually open source on GitHub )

In this article I’m going to focus on the Confirmation message that should be displayed at the end of the flow.

Read More

Share Comments

Open PDFs in a converted iOS app

One of the apps I ported from iOS to Windows 10 using WinObjC was using the web view to open up pdf files that were deployed with the app. While this works fine in iOS it does not port well to Win10 since the Edge browser does not support (yet ?) opening up a PDF file directly.

I’ve thought of a few approaches like use another web browser component - Awesomium or render the PDF yourself using the Windows.Data.PDF classes, but these require extensive changes to your code base which is not something you want in this process.

However, I found a couple of solutions that worked out.

Read More

Share Comments

Links of the week (Jun 19)

New features in the Windows Bridge for iOS

XAML Animations with Attached Properties

.NET open source contributions map

What’s new for UWP apps on Xbox One - June release

Share Comments

Error opening converted iOS App

I ran into a strange error recently when I tried to open one of my converted iOS Windows Bridge for iOS.
The project would not load and there was not much of an error message, until I checked the output windows.

Error: The imported project "C:\_CODES\WinObjC\msvc\starboard.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

At this point I realized that I was opening this on another machine and that on this machine the WinObjC SDK was not installed in the same path as the other one.


Edit project file find the reference to WINOBJC_SDK_ROOT and change it to the proper location


As mentioned in my other article make sure that you install the SDK in a path that does not contain any spaces in its name.

Share Comments

My first Channel 9 videos

As the BUILD Tour came to Toronto last Friday, I was given the opportunity to record a couple of videos for the Bonus section of the event.
So, along with my colleague Jeremy we talked about a couple of topics related to HoloLens development.

BONUS: An Intro to the HoloLens Experience

BONUS: Designing for Spatial Variation

That was a blast and I hope I get to do it again soon.

Share Comments

Bringing your iOS app to Windows

What is the iOS bridge

The Windows Bridge for iOS (previously known as Project Islandwood, or WinObjC) is an OpenSouce project started and maintained by Microsoft primarily and by the community that allows developers to enable their existing iOS apps written in Objective-C to run on Windows 10 as Universal Windows Platform apps. What’s more, you can enhance those apps with UWP specific features like Live Tiles, Cortana and others.

How does it work

There are 3 main components that make the bridge:


A custom clang compiler was written for this project to support compile Objective-C language to Windows bytecode.

Compatibility Libraries

To ensure that your apps can compile without any code changes, all of the APIs had to be written to conform to the Apple API definition but using the underlaying Windows libraries. I.E Imagine the CCLocationManager class, implemented using the Geolocator API.
Additionally, all the Windows API definitions have been described as headers from the Windows core winmd files to be made accessible to the Objective-C language.


There are a number of differences in the way an Xcode project is structured vs a Visual Studio project. The vsimporter, tool will generate the solution files and convert any assets to match the requirements for a Windows App, while other tools will compile the Storyboards and Xibs.
Last but not least, the Visual Studio syntax highlight plugin enables nice syntax highlighting for Objective-C in Visual Studio

Converting your first app

The way I see it there are 3 steps in porting an iOS app with the Windows Bridge for iOS


In the conversion step we are transforming our Xcode project into a Visual Studio solution file that we can open up with Visual Studio. This is relatively easy, and seldom creates any issues. Open a command prompt in the folder hosting your Xcode project and run the vsimporter.exe file from the WinObjC bin folder.
What you’ll get is a new folder that contains the generated UWP project and a Visual Studio Solution file that you can open up.


With the first step out of the way, we can now open the solution in Visual Studio and make sure we can actually compile. This step is a bit trickier than before and you’ll often need to make minor adjustments to ensure the solution compiles.
If there are API’s that were not bridged you will get compilation errors and need to find workarounds for those portion of the code (a lot of the APIs have been stubbed out, so they won’t give compilation errors, but there are still some missing). Also due to platform differences some structs or enums might be different and you’ll need to fix those (i.e. mach_timebase_info_data_t missing in Win32 use mach_timebase_info_t instead)


By far the most complex task, and probably where most of the time will be spent in a conversion project is to ensure that at runtime, the project works and behaves as expected.
All those missing APIs that have been stubbed out will start to cause problems now, and some differences in how APIs are implemented can crash your app.
It’s too broad of a subject to try and describe in great detail, but the one thing that is worth mentioning at this point is that every time you encounter a runtime problem, your first instinct should be to find the root cause and see if this is a problem with your code or maybe a more general issue with the SDK itself, and if it’s generic enough, open an issue of the project’s page or better yet, open the issue, and try and fix it and open a pull request so that everyone else can benefit from it.

Enhance your app

If that wasn’t enough, after you have finished converting your app and everything works great on Windows, you can go a step further and start enhancing the app with Windows specific features like Cortana, Live-Tiles, Notifications, etc. You can do that with using Objective-C code since all the Windows APIs have been exposed and accessible from your ObjC code.

Help improving the bridge

Contributions to the project are always welcome. As I mentioned above, whenever possible, try and update the SDK rather to change your code if something does not look right. If you’re having an issue and the code works properly on iOS, that might be a good thing to update in the SDK for future conversions to just work.
Make sure you read the contribution guidelines.

Other resources

The main project page can be found on GitHub where there are links to great additional resources.

Check out the BUILD 2016 session - Getting started with the Windows Bridge for iOS

Lastly the Dev Center Bridge for iOS page.

Share Comments

Links of the week (May30-Jun5)

Some of this weeks most interesting articles and news:

HoloLens Software Update

Opening Windows Holographic

HyperDev by Fog Creek

Designing for Virtual Reality

Share Comments

Xbox One Deploy Error

As I was trying to deploy one of my apps to the Xbox One, I ran into a strange error that ate a lot of my time to fix.
I don’t think you’ll be getting in this touble if you start from scratch but considering a lot of the new apps on Xbox will be existing apps, this might apply

The Error

DEP0700 : Registration of the app failed. 
Deployment Register operation with target volume C: on Package xxx_xxx_x86__wr8y21pj9dftj
from: (AppxManifest.xml) failed with error 0x80073CFD.
See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues. (0x80073cfd)


  • Make sure package.appxanifest TargetDeviceFamily includes Windows.Xbox or Windows.Universal.

    <TargetDeviceFamily Name="Windows.Xbox" MinVersion="" MaxVersionTested="10.0.10586.0" />
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="" MaxVersionTested="10.0.10586.0" />
  • Fix Visual Assets

    • Scale 200 required. This is the default scale for Xbox and you might not have all your assets if you only targeted small factor screens before.
  • Package Name
    • Some package names would fail to deploy. Could not find a clear pattern but mostly when a ‘.’ is involved it tends to fail. If nothing else works, consider playing with the package name.
Share Comments

Xbox One Developer

As I’ve mentioned in my Build 2016 overview post, this year Microsoft announced they are finally opening the Xbox One for developers to deploy and debug their apps.
So I did a quick test and tried to deploy one of my apps on the Xbox as a quick experiment.

To get started you can read all about it on the official site but here is a quick summary of the most important things I found

  1. Read the fine print before you activate developer mode. Some of the limitations are pretty rough so make sure you are aware of what you’re getting into: some games might not work anymore, you might need to reset your console to leave the developer mode and streaming to a Win 10 machine is not going to work anymore.
  2. You do need a developer account to enable Developer Mode on your console. Within your developer account you can only activate 3 consoles. Once activated, multiple developers can pair to the console and deploy from their Visual Studio
  3. When deploying from Visual Studio, ensure that the authentication mode is set to Universal. The error you get if the mode is incorrect is not the most obvious error so pay attention beforehand.
  4. If by any chance your app is a WinJS app rather than a XAML/C# app, you will need to make some modifications to make it work out of the box. Check out the great TVHelpers library.

I’m really excited at the new possibilities that the Xbox opens and I am looking forward to publishing my first Xbox compatible app soon.

Share Comments