Getting Started With Phone GapPublished: 22-Oct-2015
This is a very quick and dirty tutorial on how to install PhoneGap, using the PhoneGap iPhone App and the PhoneGap OSX.
- PhoneGap utilizes Cordova plug-ins for a lot of App functionality. To get Cordova, you first need node.js. If you're on OSX, here's a guide to getting node.js.
- Install Cordova. I used this Terminal command only:
sudo npm install -g cordova
In case you do not have PhoneGap installed, use this excellent guide.
If you don't know what PhoneGap is, back up a little and read this first.
After you have installed PhoneGap's OSX GUI and iPhone App, you can press the "+" symbol to create a new project. Choose the location of your dreams (I use a folder called "PhoneGap Workspace" within my Documents folder as the location for my projects). PhoneGap doesn't care where you put your projects. Just make sure you use some place that you can remember. For better details on creating your first project, read this guide.
The trickiest part is connecting your PhoneGap App to your PhoneGap server (the bit that you installed on OSX). To connect, you may need to modify the IP Address that appears in the PhoneGap App window. Which is covered here.
From the cordova-js page, use the "Download Zip" file to download the cordova-js-master.zip file to your machine. You will then need to:
- unzip the file
- locate the folder called "src" within the expanded zip files.
2. Status Bar
You will need to use Terminal to change to your project's directory, and then you will need to enter the following command:
\\\[code language="bash"]cordova plugin add cordova-plugin-statusbar\\\[/code]
The Status Bar page also includes information on how to implement this plug-in. This plug-in helps to automatically size your window around the status bar of the device your App is running on. Nice!