Cordova Tutorial for Beginners

Cordova is a platform that is used for building mobile apps using HTML, CSS and JS. We can think of it as a container for connecting our web app with native mobile functionalities. Cordova offers a bridge for connection between web app and mobile device. By using Cordova, we can make hybrid mobile apps that can use camera, geolocation, file system and other native mobile functions.

Environment Setup

To begin with the setup, we need to first install a few components first

  • NodeJS and NPM – NodeJS is the platform needed for Cordova development. Check out our NodeJS Environment Setup for more details.
  • Android SDK – For Android platform, you need to have Android SDK installed on your machine. Check out Android Environment Setup for more details.
  • XCode – For iOS platform, you need to have xCode installed on your machine. Check out iOS Environment Setup for more details

Installing git on Windows

Even if you don’t use git, it should be installed since Cordova is using it for some background processes. You can download git here. After you install git, open your environment variable.

  1. Right-Click on Computer
  2. Properties
  3. Advanced System settings
  4. Environment Variables
  5. System Variables
  6. Edit

Copy the following at the end of the variable value field. This is default path of the git installation. If you installed it on a different path you should use that instead of our example code below.

;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd

Now you can type git in your command prompt to test if the installation is successful.

By default, MacOS already have Java and git built-in within the OS itself

Installing Cordova

This step will download and install Cordova module globally. Open the command prompt and run the following −

C:\Users\username>npm install -g cordova

You can check the installed version by running:

C:\Users\username>cordova -v

This is everything you need to start developing the Cordova apps on Windows operating system. In our next tutorial, we will show you how to create first application.

Leave a Reply

Your email address will not be published. Required fields are marked *