Nectar Documentation
DemoBuy Now
  • Introduction
  • Getting Started
    • Requirements
    • Installation
    • Directory Structure
    • Dependencies & Plugins
  • Basics
    • Configuration
    • Routes
    • Layout
    • Navigation
    • Initialization
    • Theming
    • Internationalization
    • Store Management
  • UI & UX
    • Components
      • Accordion
      • Action Sheet
      • Audio
      • Autocomplete
      • Badge
      • Breadcrumb
      • Button
      • Card
      • Chart
      • Checkbox
      • Chip
      • Color Picker
      • Content Block
      • Data Table
      • Date-Time Picker
      • Dialog
      • Dropcap
      • Elevation
      • Embed
      • Empty State
      • Expandable Card
      • Flip Card
      • Floating Action Button
      • Form Input
      • Form Validator
      • Gauge
      • Grid
      • Icon
      • Image
      • Image Compare
      • Image Hotspot
      • Infinite Scroll
      • Keypad
      • Line Divider
      • List Index
      • List View
      • Marquee
      • Menu
      • Menu List
      • Navbar
      • Note
      • Notification
      • Pagination
      • Photo Browser
      • Picker
      • Popover
      • Popup
      • Preloader
      • Progress Bar
      • Pull-to-Refresh
      • Quote
      • Radio
      • Range Slider
      • Rating
      • Ribbon
      • Searchbar
      • Sheet Modal
      • Show More/Less
      • Side Panel
      • Signature Pad
      • Skeleton
      • Smart Select
      • Sortable List
      • Stepper
      • Subnavbar
      • Swipeout
      • Swiper Slider
      • Syntax Highlighter
      • Tab
      • Text Editor
      • Timeline
      • Timer
      • Toast
      • Toggle
      • Toolbar
      • Tooltip
      • Tour Guide
      • Tree View
      • Video
      • Virtual List
    • Screens
      • Splash Screen
  • Advanced
    • Web APIs
      • App Badging API
      • App Shortcuts API
      • Battery Status API
      • Clipboard API
      • Contact Picker API
      • Device Memory API
      • Device Orientation API
      • File API
      • Fullscreen API
      • Geolocation API
      • Get Installed Related Apps API
      • HTML Media Capture API
      • Local Storage API
      • Network Information API
      • Notifications API
      • Online & Offline Status API
      • Page Visibility API
      • Permissions API
      • Picture-In-Picture API
      • Quota Estimation API
      • Screen Orientation API
      • Screen Wake Lock API
      • Server-Sent Events API
      • Session Storage API
      • Vibration API
      • Web Share API
    • Cordova Plugins
      • Battery Status
      • Build Info
      • Camera
      • Contacts Info
      • Device
      • Dialogs
      • Fingerprint Authentication
      • Geolocation
      • In-App Browser
      • Media Capture
      • Network Information
      • Social Sharing
      • Splash Screen
      • SQLite
      • Status Bar
      • Vibration
    • Integrations
      • AlaSQL
      • Disqus
      • Embedly
      • Facebook Comments
      • Google AdMob
      • Google Maps
      • Google Sheets
      • Gravatar
      • Lottie
      • Mailchimp
      • QR Code
      • RSS
      • Telegram Comments
      • WordPress
      • YouTube
  • Publishing
    • Progressive Web App
    • Cordova App
  • Help
    • Changelog
    • Support
    • Customization
  • Tutorials
    • How to Create and Animate an SVG Image Using JavaScript
Powered by GitBook
On this page
  • Overview
  • Installing Cordova CLI
  • Modifying Configuration File
  • Adding Reference to cordova.js
  • Compiling Cordova Project
  1. Publishing

Cordova App

PreviousProgressive Web AppNextChangelog

Last updated 8 months ago

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)

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.

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

<!--<script src="cordova.js"></script>-->

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/latest
https://cordova.apache.org/docs/en/latest/config_ref/index.html
https://cordova.apache.org/docs/en/11.x/guide/cli/index.html#build-the-app