Driven 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.
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 iOSusing 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.