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.
- Open your project in Visual Studio 2013.
- Perform steps 2-4 in Creating a Windows 8.1 Application to
retarget the application.
- Select the project, right click and select Add Windows Phone
8.1.
- 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:
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:
Add Native References to the Windows 8.1 project.
- 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.
- Click Browse and navigate to the directory that contains the native
dependencies.
- If an AnyCPU version exists, select it. Otherwise,
select x86 or x64.
- Add all the files in that directory (*.dll,
*.winmd)
Move shared code to the shared project.
- Move the entire www folder to the shared project.
- Rebuild the solution by clicking Build >
Build Solution.
You can now develop your Windows Phone 8.1 application using the plugin.