Show TOC

Creating a Windows Phone 8.1 ApplicationLocate this document in the navigation structure

Create a Windows Phone 8.1 Cordova application by adding the platform to the project, adding native references to the project, moving shared code to the shared project, and rebuilding the solution.

Prerequisites

Set up your development environment, and create an Apache Cordova project for Windows 8.1. See:
  • Setting up the Development Environment
  • Creating an Apache Cordova Project

Procedure

Add the Windows Phone 8.1 platform.

  1. Open your project in Visual Studio 2013.
  2. Perform steps 2-4 in Creating a Windows 8.1 Application to retarget the application.
  3. Select the project, right click and select Add Windows Phone 8.1.
  4. Click OK in the dialog.
    You can view three projects in your solution:
    • a Windows 8.1 project
    • a Windows Phone 8.1 project
    • a Shared project (to share common resources between the above projects)

    If you are adding a Windows 8.1/Windows Phone 8.1 plugin built using only JavaScript technologies (that is, no native dependencies), then the plugin installation is complete. Applies to these plugins:

    • Push
    • Settings

    If you are adding a Windows Phone 8.1 plugin built that depends on native code (see list below), complete these additional steps. Applies to these plugins:

    • Logon
    • AuthProxy
    • Logger

Add Native References to the Windows 8.1 project.

  1. Expand the Project node. Right-Click on References and click Add Reference.

Add the native Windows DLL or Runtime component that the plugin depends on.

  1. Click Browse and navigate to the directory that contains the native dependencies.
    1. If an AnyCPU version exists, select it. Otherwise, select x86 or x64.
    2. Add all the files in that directory (*.dll, *.winmd)

Move shared code to the shared project.

  1. Move the entire www folder to the shared project.
  2. Rebuild the solution by clicking Build > Build Solution.
    You can now develop your Windows Phone 8.1 application using the plugin.