PhoneGap 3 – My initial experience

PhoneGap 3.0 was released this year in July, but I hadn’t given it a try till a few days back.     I had to start a new PhoneGap project using the latest version (PhoneGap 3.3).
There have been significant changes in the way PhoneGap is installed and project created since PhoneGap 3.0. These changes have been very well documented in the official PhoneGap documentation and various blogs. So installing and PhoneGap 3.3 and creating the first project was a smooth experience.

The problem for me started after the bare minimum project was created. One of the important changes in PhoneGap 3.0 is that every device feature API is a plugin (e.g. contacts, camera etc.) and none of the device APIs are automatically included when you create a project using CLI. You have to add then after you created the project. I was aware of this change and added plugins that I needed using CLI. I then expected to have these APIs available in the application (I created iOS and Android Apps). But they were not. Continue reading “PhoneGap 3 – My initial experience”

Using iOS Native Views in PhoneGap Projects

I am working on an iOS application where I want to use PhoneGap as well as a native iOS View. I want iOS view to be the first page from which user can navigate to a view created by PhoneGap. I have developed iOS applications either completely using PhoneGap or native APIs, but never tried to use both in the same application. So figuring out how to do that took some time and I thought I would share that here.

By the way, if you want to embed PhoneGap WebView into existing iOS project then follow instructions at Embedding WebViews. In this post I am going to explain how to embed native iOS view into a PhoneGap project and set it as the initial page.

First you create a PhoneGap project. I created the project using Command Line Interface of PhoneGap 3.1. Go to the folder where you want to create the project and run following command (I am assuming project name to be iOSPhoneGapProject here)

$ phonegap create iOSPhoneGapProject ram.kulkarni.iOSPhoneGapProject iOSPhoneGapApp

Continue reading “Using iOS Native Views in PhoneGap Projects”

Social