Windows Phone 8 Platform Guide

Windows Phone 8 Platform Guide

This guide describes how to set up your development environment for Cordova and run a sample application. Note that Cordova used to be called PhoneGap, so some of the sites still use the old PhoneGap name.

NOTE: Applications built with Apache Cordova for Windows Phone 8 run only on Windows Phone 8 devices. If you want to target both 7.5 'and' 8 devices, then use Apache Cordova for Windows Phone 7, which does not have all the advanced features included in IE10, but implements the same APIs.

1. System Requirements

NOTE: Running the SDK in Virtual Machine might present some challenges. You can read this blog post that gives insight on the solutions to develop for Windows Phone on a Mac.

2. Install SDK + Cordova

2.1. Building the template

NOTE: this step may not be required. If the lib\windows-phone directory already contains a file CordovaWP8xx_x.zip then you may skip this step.

In order to simplify the development process, Cordova comes with a Visual Studio template that allows creating a Cordova application rapidly. This template can be modified if needed and the below steps indicate how to proceed if you want to modify and re-generate the template.

2.2 About the different templates

Apache Cordova for Windows Phone 8 only supports the standalone template.

The 'Stand-Alone' template includes all the source code for Apache Cordova. This project is easier to fine-tune to use just the features you need, thereby working around the permissions issues of the 'Full' template, however this type of project is more difficult to update, as you update individual files within your project and manage any dependancies yourself. In order to exclude an unused API, simply right-click-select the Command class file in Visual Studio and choose do not include in project.

3. Set up New Project

4. Review the project structure

5. Build and Deploy to Emulator

6. Build your project for the device

In order to test your application on a device, the device must be registered. Click here to read documentation on deploying and testing on your Windows Phone 8.

Done!

Further Reading

For more details on the specific differences between IE10 and WebKit browsers, and how to support both MS has a helpful guide here