Platforms and Plugins Version Management

Platforms and Plugins Version Management From version 4.3.0 onwards, Cordova provides the ability to save and restore platforms and plugins. This feature allows developers to save and restore their app to a known state without having to check in all of the platform and plugin source code. The 'save' command stores details about the app's platform and plugin versions in config.xml. The 'restore' step happens automatically when a 'cordova prepare' is issued, making use of information previously s

backbutton

backbutton The event fires when the user presses the back button. To override the default back-button behavior, register an event listener for the backbutton event. It is no longer necessary to call any other method to override the back-button behavior. Quick Example document.addEventListener("backbutton", onBackKeyDown, false); function onBackKeyDown() { // Handle the back button } Windows Quirks Throw an error in a backbutton callback to force the default behavior, which is an app exit:

resume

resume The resume event fires when the native platform pulls the application out from the background. Quick Example document.addEventListener("resume", onResume, false); function onResume() { // Handle the resume event } iOS Quirks Any interactive functions called from a pause event handler execute later when the app resumes, as signaled by the resume event. These include alerts, console.log(), and any calls from plugins or the Cordova API, which go through Objective-C. active event The

cordova clean

cordova clean command Synopsis Cleans the build artifacts for the specified platform, or all platforms by running platform-specific build cleanup. Syntax cordova clean [<platform> [...]] Example Clean android platform build artifiacts: cordova clean android

&lt;content&gt;

content Defines the app's starting page in the top-level web assets directory. The default value is index.html, which customarily appears in a project's top-level www directory. Attributes(type) Only for platform: Description src(string) Required Defines the app's starting page in the top-level web assets directory. The default value is index.html, which customarily appears in a project's top-level www directory. Examples: <widget ...> <content src="startPage.html"></cont

cordova-plugin-console

This documentation describes this plugin at version master. Other versions are on GitHub. Android iOS Windows 8.1 Store Windows 8.1 Phone Windows 10 Store Travis CI cordova-plugin-console This plugin is meant to ensure that console.log() is as useful as it can be. It adds additional function for iOS, Ubuntu, Windows Phone 8, and Windows. If you are happy with how console.log() works for you, then you probably don't need this plugin. This plugin defines a global console object. A

cordova-plugin-splashscreen

This documentation describes this plugin at version master. Other versions are on GitHub. Android iOS Windows 8.1 Store Windows 8.1 Phone Windows 10 Store Travis CI cordova-plugin-splashscreen This plugin is required to work with splash screens. This plugin displays and hides a splash screen during application launch. Report issues with this plugin on the Apache Cordova issue tracker. Installation // npm hosted (new) id cordova plugin add cordova-plugin-splashscreen // you may

Windows Platform

Windows Platform Guide This guide shows how to set up your SDK development environment to build and deploy Cordova apps for Windows 8.1, Windows Phone 8.1, and Windows 10 Universal App Platform. It shows how to use either shell tools to generate and build apps, or the cross-platform Cordova CLI. (See the Overview for a comparison of these development options.) This section also shows how to modify Cordova apps within Visual Studio. Regardless of which approach you take, you need to install the

cordova serve

cordova serve command Synopsis Run a local web server for www/ assets using specified port or default of 8000. Access projects at: http://HOST_IP:PORT/PLATFORM/www Syntax cordova serve [port]

BlackBerry 10 Platform

BlackBerry 10 Platform Guide This guide shows how to set up your SDK environment to deploy Cordova apps for BlackBerry 10 devices. For previous versions of BlackBerry, you need to use a different SDK environment and set of command-line tools, described in the BlackBerry Platform Guide. For BlackBerry 10, you need to install the SDK regardless of whether you want to use the cross-platform Cordova CLI for development, or a narrower set of platform-centered command-line tools. For a comparison of