Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

PhoneGap Build and PhoneGap 3.0: Things to Remember

DZone's Guide to

PhoneGap Build and PhoneGap 3.0: Things to Remember

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

This week, we officially launched PhoneGap 3.0 support for PhoneGap Build. You can read the blog post on it here. Before you get started, there are a few things I want to call out.

The first thing you should note is that Build is not yet defaulting to 3.0 when you create a new project. If you want to use 3.0, please be sure to specify it in the config.xml file:

<preference name="phonegap-version" value="3.0.0" />

Next - if you remember my blog post on PhoneGap 3 (PhoneGap 3.0 Released - Things You Should Know), then you remember that the biggest change was to core features. In order to use any of the core features you must include the plugin for it.

PhoneGap Build also has this rule!

In order to include a core plugin with your PhoneGap Build project, simply add the gap:plugin tag to your config.xml file. Here is an example:

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

PhoneGap Build now has a "Plugins" tab for each project. This is a great way to confirm that you set up the config.xml correctly:

If you forget the value for a particular plugin, or want to see what PhoneGap Build supports from third parties, just hit the Plugins tab at the very top of the page. The list of supported third-party plugins seems to be much improved!

Finally, don't forget to peruse the doc updates. We recently launched the ability to select a platform, among other updates.


Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:

Published at DZone with permission of Raymond Camden, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}