Show TOC

Creating a Windows 8.1 ApplicationLocate this document in the navigation structure

Create a Windows 8.1 Cordova application by retargeting the project to Windows 8.1, adding native dependencies, 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

Retarget the project to Windows 8.1.

  1. Open your newly created project in Visual Studio 2013.
  2. You are prompted to retarget the project to Windows 8.1. Click OK.
  3. Select the solution in Solution Explorer, right click and select Retarget to Windows 8.1.
    If the operation is successful, you will notice a suffix (Windows 8.1) next to your project name.

    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 8.1/Windows Phone 8.1 plugin built that depends on native code (see list below), complete these additional steps. Applies to these plugins:

    • Encrypted Storage
    • 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. Note that if the plugin may have different native library versions for x86 | x64 or AnyCPU.
    1. If an AnyCPU version exists, select it. Otherwise, select x86 or x64.
    2. Add all the files in that directory (*.dll, *.winmd)
  2. If you included an x86 or x64 dependency, specify the dependency.
    1. Click on Build > Configuration Manager.
    2. Select the appropriate CPU architecture (x86 or x64) based on the dependency CPU architecture under the "Active Solution Platform" and click Close.

  3. Rebuild the solution by clicking Build > Build Solution.
    You can now develop your Windows 8.1 application using the plugin.