Set Plugin Variables

Filter by IDE
Select the AppBuilder client you are currently using for development.

IDE

After you add an Apache Cordova plugin to your app, you can configure the values for any plugin variables declared in the plugin.xml. If you do not set the required plugin variables, AppBuilder might not be able to build your app.

Prerequisites

  • Verify that your preferred AppBuilder client is running and you are logged in.
  • Verify that you have opened the code for your app in AppBuilder.
  • Verify that you have added the plugin for which you want to configure plugin variables.

Procedure

With these steps, you can set the plugin variables for core, integrated or verified plugins. To set the plugin variables for custom plugins, see Configure the Custom Plugin for Building.

For Apache Cordova 6.4.0, every plugin that uses camera, contacts, microphone, etc., must have a Usage Description. You can set it as a plugin variable.

In-Browser

  1. In the Project Navigator, double-click Properties.
  2. Locate your plugin in the Core Plugins or Other Plugins section.
  3. (Optional) Click open for the plugin to review the plugin documentation or click view to view the plugin.xml for the plugin.
  4. Click Expand for the newly added plugin to expand its configuration options.
  5. Click Configuration Variables.
  6. Select the build configuration to which you want to apply the plugin variables.
  7. Provide values for the listed variables and click Done.
  8. Close the properties dialog.
  9. For the configuration changes to take effect, re-build your app.

Universal

  1. In the Project Navigator, double-click Properties.
  2. Locate your plugin in the Core Plugins or Other Plugins section.
  3. (Optional) Click open for the plugin to review the plugin documentation or click view to view the plugin.xml for the plugin.
  4. Click Expand for the newly added plugin to expand its configuration options.
  5. Click Configuration Variables.
  6. Select the build configuration to which you want to apply the plugin variables.
  7. Provide values for the listed variables and click Done.
  8. Close the properties dialog.
  9. For the configuration changes to take effect, re-build your app.

Windows

  1. In the Project Navigator, double-click Properties.
  2. Locate your plugin in the Core Plugins or Other Plugins section.
  3. (Optional) Click Open for the plugin to review the plugin documentation or click view to view the plugin.xml for the plugin.
  4. Click Expand for the newly added plugin to expand its configuration options.
  5. Click Configure.
  6. Select the build configuration to which you want to apply the plugin variables.
  7. Provide values for the listed variables and click Close.
  8. Press Ctrl+S to save your changes.
  9. Close the properties dialog.
  10. For the configuration changes to take effect, re-build your app.

Visual Studio

  1. In the Solution Explorer, double-click Properties.
  2. Locate your plugin in the Core Plugins or Other Plugins section.
  3. (Optional) Click Open for the plugin to review the plugin documentation or click view to view the plugin.xml for the plugin.
  4. Click + for the newly added plugin to expand its configuration options.
  5. Click Configure.
  6. Select the build configuration to which you want to apply the plugin variables.
  7. Provide values for the listed variables and click Close.
  8. Press Ctrl+S to save your changes.
  9. Close the properties dialog.
  10. For the configuration changes to take effect, re-build your app.

CLI

  1. In the command prompt, navigate to the directory that contains your app.
  2. To list the current plugins and information about their plugin variables, run the following command:

    appbuilder plugin
    
  3. To configure the plugin variables of a selected plugin, run the following command:

    appbuilder plugin configure <Plugin Name or ID>
    

    <Plugin Name or ID> is the name or ID of the plugin as listed by appbuilder plugin

    Set the --debug or --release switch to configure the variable only for the corresponding build configuration. If no switch is set, the command-line interface prompts you to set the plugin variables for all build configurations.

  4. When prompted, provide value for the plugin variable for the Debug configuration and press Enter.
  5. When prompted, provide value for the plugin variable for the Release configuration and press Enter.

Next Steps

Continue developing your app and writing and debugging your code.

See Also

Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.