PhoneGap User Defined Plugin Library Manager
The PhoneGap Builder includes a User Defined Plugin Library Manager that allows the developer to include any PhoneGap plugin that is publicly available from GitHub, NPM or the (now deprecated) PhoneGap Plugin Repository.
While Alpha Anywhere includes the ability to add most of the major PhoneGap plugins to any project from within the PhoneGap App Builder, the list of available PhoneGap plugins is extensive and dynamic. You may find that you need to use a PhoneGap plugin that is not listed in the PhoneGap App Builder's 3rd Party Plugins section. With the User Defined Plugin Library Manager, you can build a library of user included plugins for use within any Alpha Anywhere PhoneGap App. It's easy to add any PhoneGap plugin that you'd like to use with the User Defined Plugin Library Manager.
The PhoneGap User Defined Plugin Library Manager is accessed by clicking the button labled Manage My PhoneGap Plugins from within the PhoneGap App Builder.
The PhoneGap User Defined Plugin Library Manager allows you to add, edit or delete any publicly available 3rd party PhoneGap plugin for use within the PhoneGap App Builder.
The New button allows you to insert a new PhoneGap Plugin definition. Required fields include the plugin name, a resource or URL link (for GIT installed plugins) and the required repository which may be GIT, NPM or PGB. The PGB (PhoneGap Build) repository has been deprecated and should not be used for new projects.
Optional fields include the help field that will display in the help text area of the PhoneGap App Builder and the plugin version> If the version field is left blank, the latest plugin version is always loaded with the project.
The Edit button allows you to edit an existing PhoneGap Plugin definition. If you make a change to the resource or url link and have installed the older definition of the plugin in any PhoneGap Build project, the older plugin resource will remain referenced in the PhoneGap config.xml file. If you need to remove the reference in the PhoneGap Build config.xml file, you'll need to do that manually. See the instructions below.
If you define a plugin resource/url that already exists within the PhoneGap App Builder 3rd Party Plugins list, the user referenced plugin will always take the highest priority. Assuming that the resource/url link is exactly the same as the resource/url link within the PhoneGap App Builder 3rd Party Plugins list, then the user included plugin will appear with the User Defined Plugins and the built in 3rd party plugin will not appear within the 3rd Party Plugin list.
This allows the developer to easily specify a preferred specific plugin version or repository. In the example below, we are including a definition for the printer plugin, which is already included within the PhoneGap Builder 3rd Party Plugins list however, the repo has been changed from PGB to NPM.
If you have included a large number of plugins within the User Defined PhoneGap Plugin Library, you may find it helpful to use the list filter to help manage the plugin definitions. The filter is keyed on the plugin name. Make sure to clear the filter when it is no longer required.
To delete a User Defined PhoneGap plugin definition from the list, click on the plugin name in the list and click the delete button. Once confirmed, the plugin definition will be deleted from the User Defined Plugin Manager list. If the plugin has been used in any PhoneGap App project, the plugin will still be referenced within the project config.xml file. To remove the plugin from the PhoneGap project, you will need to manually edit the config.xml file and delete the line that references the plugin.
From within the PhoneGap App Builder, click the Save button and click the displayed hyperlink to edit the project's config.xml file. If you have changed the resource/url of a User Defined plugin, you'll see the old and new plugin resource referenced within the project config.xml file. To remove the plugin from the project, delete the line that includes the plugin within the config.xml file and click the Save button.