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, 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.
  4. If you added the Offline OData plugin to your project, make the following changes to add the native Windows references.
    1. Select the References node, right click and select Add Reference.
    2. Click Browse, and locate the OfflineOData plugin location on your disk ({OfflineODataPluginDirectory}/windows81/bin/win).
    3. Select the *.winmd and *.dll file for the appropriate CPU architecture of your project (x86 or x64 or ARM). This file is located in {OfflineODataPluginDirectory}/windows81/bin/win/[x86 or x64 or ARM].
    4. Select Windows 8.1, Extensions and select Microsoft Visual C++ 2013 Runtime Package for Windows (Version 12.0 or higher).
    5. Click OK to add the references.
  5. If you added the Push plugin to your project, make the following changes to the package manifest to support push notifications.
    1. Open the package.windows.appxmanifest, and change:
      <LockScreen BadgeLogo="images\logo-lockscreen.png" Notification="badge" />

      to:

      <m2:LockScreen BadgeLogo="images\logo-lockscreen.png" Notification="badge" />
    2. Add this code to the place before "</m2:VisualElements>".

      Old code in line 19 & 20 in the file:

      <m2:SplashScreen Image="images\splashscreen.png" /> 
      </m2:VisualElements>

      Code after modifying (line 19-21):

      <m2:SplashScreen Image="images\splashscreen.png" /> 
      <m2:LockScreen BadgeLogo="images\logo-lockscreen.png" Notification="badge" /> 
      </m2:VisualElements>"

    1. Delete or comment out code as required.
  6. Rebuild the solution by clicking Build > Build Solution.
    You can now develop your Windows 8.1 application using the plugin.