What's the deal with cordova on WP

Posted by on


Lately I have been talking to a few people about getting Ionic (open source framework for developing hybrid mobile apps with HTML5) running on a Windows Phone and just talking about it has shown me that it's a little bit of a mess working with Windows solutions at the moment because of the convergence of Windows that has slowly been happening since Windows 8 arrived.

The aim of this post is to get those starting out with Cordova apps on Windows to better understand what's going on behind the scenes because it can greatly affect how and where the app runs.

There are 2 ways to run Cordova on Windows Phone which have slightly different implications.

1. Windows Phone 8.0 - This solution compiles into a Silverlight project with an embeded webview. A few things to think about when working with this kind of project.

  • This will give you greater device support (Runs on Windows Phone 8.0 and above)
  • Performance is not as good as below.
  • Less debug support within Visual Studio
  • Seems to be less reliable with versions of IE depending on OS versions (large difference between IE rendering between WP8.1 and WP8.1-Update1)

2. Windows Phone 8.1 (or Universal) - This is a native javascript project as supported by the Windows Runtime (Windows 8.1 and Windows Phone 8.1)

  • Less device support (only Windows Phone 8.1, apparently that is over 50% of Windows Phone users now)
  • Much better performance than above
  • 100% support between Windows Store and Windows Phone
  • Upgrade path to Windows 10 will be a lot easier
  • Can debug within Visual Studio with full javascript inspection, breakpoints, DOM Explorer, etc.

Depending on how you generate your Windows Phone project with cordova determines which solution you get. With the current tools adding the wp8 platform will get you the silverlight project but adding the windows platform will give you the native javascript solution with projects for Windows Store and Windows Phone in a universal solution.