Overview

Overview

Cordova is an open-source mobile development framework. It allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development, avoiding each mobile platforms' native development language. Applications execute within wrappers targeted to each platform, and rely on standards-compliant API bindings to access each device's sensors, data, and network status.

Use Cordova if you are:

Basic Components

Cordova applications rely on a common config.xml file that provides information about the app and specifies parameters affecting how it works, such as whether it responds to orientation shifts. This file adheres to the W3C's Packaged Web App, or widget, specification.

The application itself is implemented as a web page, named index.html by default, that references whatever CSS, JavaScript, images, media files, or other resources are necessary for it to run. The app executes as a WebView within the native application wrapper, which you distribute to app stores. For the web app to interact with various device features the way native apps do, it must also reference a cordova.js file, which provides API bindings.

The Cordova-enabled WebView may provide the application with its entire user interface. It can also be a component within a larger, hybrid application that mixes the WebView with native application components. Cordova provides a plug-in interface for these components to communicate with each other.

Development Paths

The easiest way to set up an application is to run the cordova command-line utility, also known as the command-line interface (CLI). (To install the CLI, see The Cordova Command-line Interface.) Depending on the set of platforms you wish to target, you can rely on the CLI for progressively greater shares of the development cycle:

At any point in the development cycle, you can also rely on platform-specific SDK tools, which may provide a richer set of options. An SDK environment is more appropriate if you want implement a hybrid app that mixes web-based and native application components. You may use the command-line utility to initially generate the app, or iteratively thereafter to feed updated code to SDK tools. You may also build the app's configuration file yourself.

Platform Support

The following shows the set of development tools and device APIs available for each mobile platform:

Android Blackberry Blackberry 10 iOS Windows
Phone 7
Windows
Phone 8
Windows
8
cordova
CLI
Mac, Windows, Linux Mac, Windows Mac, Windows Mac Windows Windows
PhoneGap
Build
IDE platform support
Embedded
WebView
Plug-in
Interface
Platform APIs
Accelerometer
Camera
Capture
Compass (3GS+)
Connection
Contacts
Device
Events
File
Geolocation
Globalization
InAppBrowser
Media
Notification
Splashscreen
Storage