LinuxCommandLibrary

cordova

hybrid mobile app development framework

TLDR

Create a new Cordova project

$ cordova create [myapp] [com.example.myapp] "[MyApp]"
copy
Add a platform (iOS, Android, etc.)
$ cordova platform add [android]
copy
Build the app for all platforms
$ cordova build
copy
Build for a specific platform
$ cordova build [android]
copy
Run the app on an emulator or device
$ cordova run [android]
copy
Add a plugin
$ cordova plugin add [cordova-plugin-camera]
copy
List installed plugins
$ cordova plugin list
copy
Remove a platform
$ cordova platform remove [ios]
copy

SYNOPSIS

cordova command [options]

DESCRIPTION

Apache Cordova is a mobile application development framework that allows building apps for multiple platforms using HTML, CSS, and JavaScript. The CLI manages project creation, platform configuration, plugin installation, and app building.
Cordova wraps web applications in a native container, providing access to device features through JavaScript APIs. Plugins bridge the gap between web code and native functionality like camera, GPS, contacts, and file system access.
The workflow typically involves creating a project, adding target platforms, installing necessary plugins, developing the web app in the www directory, and using build/run commands to test on devices or emulators.

PARAMETERS

create DIR ID NAME

Create a new Cordova project in the specified directory.
platform add PLATFORM
Add a platform (android, ios, browser, electron).
platform remove PLATFORM
Remove a platform from the project.
build [PLATFORM]
Build the app for specified or all platforms.
run [PLATFORM]
Run the app on device or emulator.
emulate PLATFORM
Run the app in a platform emulator.
plugin add PLUGIN
Add a plugin to the project.
plugin remove PLUGIN
Remove a plugin from the project.
plugin list
List installed plugins.
prepare
Copy files into platform directories for building.
--release
Build in release mode.
--device
Deploy to connected device instead of emulator.

CAVEATS

Platform SDKs must be installed separately (Android SDK, Xcode for iOS). iOS development requires macOS. Some plugins may have platform-specific limitations. Performance may not match fully native applications for intensive tasks.

HISTORY

Cordova originated as PhoneGap, created by Nitobi Software in 2009. Adobe acquired Nitobi in 2011 and donated the codebase to the Apache Software Foundation, where it was renamed Cordova. It remains one of the most widely used hybrid mobile development frameworks.

SEE ALSO

ionic(1), npm(1), phonegap(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community