Cordova App
Overview
Nectar comes with config.xml
, the configuration file for Cordova project, containing the most commonly required plugins and the default optimal configuration, ready to be compiled into native app for Android, iOS, and Electron (Desktop).
Installing Cordova CLI
For developing Cordova apps, you will need to install Cordova CLI on your machine. You can follow the official docs for installing and setting up Cordova environment according to your platform (Windows, Linux or MacOS)
https://cordova.apache.org/docs/en/latest
Modifying Configuration File
After successfully installing the Cordova CLI, you can start modifying the config.xml
file that comes with Nectar.
By default, config.xml
file comes with the optimal configuration that you will need to develop Cordova app with minimal efforts.
If you want to add any Cordova plugins, you can add those inside config.xml
file and during the compilation process they will be added to the project.
https://cordova.apache.org/docs/en/latest/config_ref/index.html
For Cordova, set <base href="." />
in index.html
file.
Adding Reference to cordova.js
In any Cordova-based application, the cordova.js
file is a crucial component that acts as a bridge between the web application and the native functionalities of the device.
The cordova.js
file is automatically generated and included when you build your Cordova app. However, to ensure your app functions correctly, it is necessary to include a reference to cordova.js
in your index.html
In Nectar, the reference to cordova.js
is already included in index.html
You just need to uncomment
Compiling Cordova Project
Once you have modified the config.xml
and want to test on emulator or real device you can follow the process described here at https://cordova.apache.org/docs/en/11.x/guide/cli/index.html#build-the-app
Last updated