PhoneGap is a open source API that we can use to develop applications that run on variety of mobile devices and platforms
This article takes you a step further in getting started with PhoneGap series. Today, we will learn how to perform the setup using Phonegap archives In case you may want to read the Day 1 article, please refer to the below link:
The objective of the article is to learn the set up process of PhoneGap using the archives.
We can perform the setup in 2 ways. One is by using the Command Line and the other one is by using the PhoneGap Archives. Here we will perform the setup using the PhoneGap Archives.
So Lets get started
- Step 1: Go to the below link and download the latest archive.Currently the latest version is PhoneGap 2.9.0.
- Step 2:Download this archive and extract the files to the desired directory/folder. Once the files are extracted, we will see 2 main folders, "doc" and "lib" as shown below.
when we open the lib folder we can found the different platforms which it covers as shown below
After downloading start the installation which may look like below
- step4:-Now to get the templates, we simply need to run the "createTemplates" batch file from the location "phonegap-2.9.0\lib\windows-phone-8".. This will open a command prompt and will gradually create templates for WP7 and WP8 respective.
Now we can see the Zipped Templates as shown below
Now If the "Silverlight for Windows Phone" folder does not exist in the Project Template folder, then simply create a new one at "C:\Users\Username\Documents\Visual Studio 2012\Templates\ProjectTemplates" location. Note: we do not need to extract these zipped archives. Also note that the folder name that you created needs to be exactly the same case and spelling.
Thats it. We are done with the setup!!! Now if we open Visual Studio 2012, we should be able to see the "Cordova 2.9.0" template under the "Silverlight for Windows Phone" section, as shown in the image below.
ConclusionIn this article we basically learned about setting up PhoneGap and setting up the template in Visual Studio 2012 for the development process.