lachesis
lachesis

Reputation: 91

Basics of phonegap

I am starting to use phonegap to create a web based application for iphones/androids.

I do not understand why it has different platforms for the iPhone and Android, when we are supposed to create one application that will suit both platforms. Also, Facebook integration with phonegap is different based on what platform I am doing it on.

My questions are:

  1. Should I create two projects, one for iphone, one for android with phonegap?

  2. If yes, then what is the point of phonegap?

Upvotes: 4

Views: 717

Answers (2)

Till Helge
Till Helge

Reputation: 9311

The idea of phonegap is "develop once, deploy everywhere", meaning that you write only one single application and then you can package it together with the different runtimes to be fit for deployment on any mobile device. It's like installing Java on Windows, Mac and Linux. You can run the same code on any of those, because there is a special implementation of Java for all three systems. Phonegap works basically the same way, except that you actually put the runtime into your application. If you look at the WAC project, they tried it the full Java way.

Upvotes: 1

Leon
Leon

Reputation: 4532

The content (your HTML/JS code) is the same - but since PhoneGap is actually a collection of Native Wrapper per Mobile framework, that's why you end up with multiple native compiled applications....

Clearer?

  1. you'll end up with one PhoneGap project per mobile you want to deploy to (iOS, Android, BlackBerry, etc...)

  2. again, your content is the same - it's just the PhoneGap project that's different, and takes care of Native implementation of the WebView (that ultimately contains your code).

Without PhoneGap, you could use your app only with a browser - no way to add webapps to the AppStore / Android Market

Hope this helps

Upvotes: 6

Related Questions