Question

I'm confused by the changes in PhoneGap build since version 3.0. When I try searching for definitive answers - there's still a lot of old information out there.

I want to use a device feature such as Camera, or Notifications, or Calendar, etc...

I know everything changed in version 3.0. And these "features" are now dealt with in the same way as plugins.

What exactly do I put in my config.xml file (for PhoneGap build) now?

I've seen:

<feature name="http://api.phonegap.com/1.0/camera"/>
<feature name="http://api.phonegap.com/1.0/contacts"/> ... etc....

and I've also seen:

<gap:plugin name="org.apache.cordova.camera"/>
<gap:plugin name="org.apache.cordova.contacts"/>  ...etc....

To be clear, is one of these depreciated? Which one should be used?

I'm talking specifically about the config.xml for PhoneGap Build - not any internal platform config.xml files for Android, iOS, etc.

Was it helpful?

Solution

For PhoneGap Build, use the gap:plugin tag.

<gap:plugin name="org.apache.cordova.camera"/>

See the PhoneGap Build docs for more details.

OTHER TIPS

In phonegap 3.x the <feature> lines are added automatically by the plugins in the platforms' config.xml file (eg:platforms/android/res/config.xml for android), so you should no more add those lines in the root config.xml.

You just add the plugins either with the cli or in the case of phonegap build by adding the <gap:plugin> lines to the root config.xml.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top