Overview

Overview

PhoneGap is a web-based mobile development framework, based on the open-source Cordova project. PhoneGap 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 PhoneGap if you are:

Basic Components

PhoneGap 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 phonegap.js file, which provides API bindings.

The PhoneGap-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. PhoneGap provides a plugin interface for these components to communicate with each other.

Development Paths

The easiest way to set up an application is to run the phonegap command-line utility, also known as the command-line interface (CLI). (To install the CLI, see The 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. (See the Platform Guides for details about each platform's SDK tool set.) 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 (6) blackberry10 ios wp7 (Windows
Phone 7)
wp8 (Windows
Phone 8)
win8
(Windows 8)
tizen webos symbian
Local SDK Support
Remote PhoneGap Build
phonegap
CLI
Mac, Windows, Linux Mac, Windows Mac, Windows Mac Windows Windows
Embedded
WebView
(see details) (see details)
Plug-in
Interface
(see details) (see details) (see details) (see details) (see details)
Platform APIs
Accelerometer
Camera
Capture
Compass (3GS+)
Connection
Contacts
Device
Events
File (no FileTransfer) (no FileTransfer)
Geolocation
Globalization
InAppBrowser
Media
Notification
Splashscreen
Storage localStorage only localStorage only