Apache Cordova 129 turns a web page into an app you can install from Google Play 1 or the App Store 10 . You write the interface in HTML, CSS and JavaScript, Cordova wraps it in a small native project for each platform, and plugins give your JavaScript the camera, the file system, geolocation and the other device features a browser keeps out of reach. The same code base builds for Android, iOS, the desktop through Electron 20,509 , and a plain browser.
Cordova is the oldest tool in this book and the simplest one to reason about, which is why it comes first. It began as PhoneGap in 2008, became an Apache project in 2012, and its plugin model, its config.xml manifest and its idea of a web app inside a native WebView still shape every hybrid framework that followed, including Capacitor 243,123 in Capacitor. Once you have seen how Cordova generates, builds and signs an Android project, the other toolchains in this book look like variations on a theme.
The chapter also sets up the machine the rest of the book depends on. Android Toolchain installs the JDK, the Android SDK, Gradle 19,597 and an emulator, and every later chapter assumes that toolchain. You then create BookNest, the small bookshop app that runs through all five chapters, build it for Android, run it on an emulator, add plugins, write one of your own, and debug it from Chrome 1 . iOS steps are covered from Apple's and Cordova's documentation, because an iOS build needs a Mac with Xcode 10 .
Cordova is no longer the default choice for a new hybrid app: Capacitor, its successor from the Ionic 20,753 team, is downloaded far more often. The chapter says so plainly, compares the two, and shows where Cordova still earns its place, from maintaining the many apps already built with it to shipping a simple web app with the fewest moving parts.
What you will learn
How native, cross-platform and hybrid apps differ, and where each chapter of this book sits.
How to install and configure the JDK, the Android SDK, Gradle and an Android emulator.
How to create a Cordova project, add platforms and run it in a browser and on an emulator.
How the WebView, the JavaScript-to-native bridge and plugin.xml fit together.
How to configure an app through www/index.html, config.xml and package.json.
How to build, sign and publish an Android App Bundle, and what an iOS release requires.
How to use the core plugins, judge third-party ones, and write a plugin in Java and Kotlin.
How to debug, secure and speed up a Cordova app, and when to choose Capacitor instead.