Getting started with PhoneGap development – What do you need?

Phone DevelopmentDriven by smartphones, mobile and web based app development has gained momentum, though, for a novice, it is getting trickier day after day. With diverse gadgets accessing the web, developers across the world face challenges pertaining to multiple use cases like varied screen sizes, pixels, screen mode (landscape or portrait), user convenience, etc. Today, all of these need thorough consideration during an app development process since it is practically impossible to write codes on and on for every new device hitting the market.

Here comes PhoneGap, an open source mobile development framework to ease the process. PhoneGap takes advantage of the WebKit rendering instance, a common characteristic of all the latest gadgets like iPhone, Android, Blackberry, Windows Mobile, etc. In addition, the developer need not learn new codes nor is he expected to have a thorough knowledge of the device SDK, but be capable of using web standards. Simply put, PhoneGap allows you to create web apps using JavaScript, HTML5, and CSS3. And it’s exciting because it harmonizes with the device API and allows you to package the web app like a native app, getting access to the phone’s unique hardware/ services.

So, let’s get started!

PhoneGap for iOS

  • Get xCode and PhoneGap installed.
  • Once done you will find a number of folders relevant to various OS. Click on the iOS folder as we are creating for iOS. This will install PhoneGap features into Xcode…
  • Run Xcode and create a new Xcode project. Opt for the folder “PhoneGap based application.” This would allow Xcode to create parts required to develop an iOS application. Compile these assets in an iOS folder on your computer.
  • Thereafter name the demo project and decide on options like the application name, screen mode, app icon, etc.
  • Subsequently, launch Xcode in the project navigator and open file named “www.” This contains all parts related to PhoneGap.
  • Click on indexfile.html. Here you can modify codes as required.
  • Now run the demo app on any preferred simulator (iOS versions). Once the demo app is successfully run you are all set to create real-time apps of your choice for iOS using PhoneGap framework.

PhoneGap for Android

  • Install eclipse and Android SDK.
  • Download ADT plug-in and restart eclipse.
  • Launch PhoneGap for Android and run Eclipse.
  • Create a new project in Eclipse and name the project. Select the appropriate Android version.
  • Check “create activity” and go to Android project folder. Build folders like www, libs, and res and drag in assets including Cordova 1.5.0.jar, Cordova 1.5.0.js, and XML to the appropriate location such that it has all parts and pieces required for the demo PhoneGap app development.
  • Finally, create index.html file and put in the required HTML codes. Choose the respective emulator and check for the output.

All said, it takes a little while to get around the framework, plus the run time for any PhoneGap app is quite high in comparison to a native app. However, developers could easily bridge the gap for it is a great tool to build effective and innovative mobile applications.

Update: Apache Cordova is a mobile application development framework created by Nitobi. Adobe Systems purchased Nitobi in 2011, rebranded it as PhoneGap, and later released an open-source version of the software called Apache Cordova. Wikipedia

Visited 2 times, 1 visit(s) today

Related Posts

Popular Posts

@macronimous Copyright © 2024.
Visit Main Site