This guide shows how to modify Windows Phone 8 projects, to upgrade from older versions of Cordova. Some of these instructions apply to projects created with an older set of command-line tools that precede the cordova
CLI utility. See The Command-Line Interface for information how to update the version of the CLI. The following section shows how to upgrade from non-CLI and CLI projects.
For non-CLI projects, run:
bin/update path/to/project
For CLI projects:
Update the cordova
CLI version. See The Command-Line Interface.
Run cordova platform update wp8
in your existing projects.
For projects that were created with the cordova CLI:
Update the cordova
CLI version. See The Command-Line Interface.
Run cordova platform update wp8
For projects not created with the cordova CLI, run:
bin\update <project_path>
For projects that were created with the cordova CLI:
Update the cordova
CLI version. See The Command-Line Interface.
Run cordova platform update wp8
For projects not created with the cordova CLI, run:
bin\update <project_path>
Create a new Apache Cordova 3.0.0 project using the cordova CLI, as described in The Command-Line Interface.
Add your platforms to the cordova project, for example: cordova
platform add wp8
.
Copy the contents of the project's www
directory to the www
directory at the root of the cordova project you just created.
Copy or overwrite any native assets from your original project (SplashScreen
, ApplicationIcon
, etc.), making sure to add any new files to the .csproj
file. The windows phone project builds inside the platforms\wp8
directory.
Use the cordova CLI tool to install any plugins you need. Note that the CLI handles all core APIs as plugins, so they may need to be added. Only 3.0.0 plugins are compatible with the CLI.
Build and test.
In Visual Studio's Solution Explorer window:
Create a new Apache Cordova WP8 3.0.0 Project.
Copy the contents of the www
directory to the new project, and be sure these items are added to the VS project.
Copy and overwrite any splash screen, or icon images.
Copy over any plugins from the plugins
directory to the new project and ensure that they are also added to the VS project.
Build and test.
NOTE: all core APIs are removed from Cordova version 3.0, and must be installed separately as plugins. For more information on how to re-enable these features in a non-CLI workflow, see Using Plugman to Manage Plugins.
© 2012–2017 The Apache Software Foundation
Licensed under the Apache License 2.0.
https://cordova.apache.org/docs/en/6.x/guide/platforms/wp8/upgrade.html