Configure the Custom Plugin for Building

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

IDE

If plugin.xml contains code for a specific Apache Cordova version that is different from the Apache Cordova version for your app, you might need to edit the file. If AppBuilder does not build your app properly, you might need to modify plugin.xml.

When you add a custom plugin to your app, you cannot choose for which build configuration to enable it. The plugin is enabled for all build configurations.

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 the custom Apache Cordova plugin contains a valid plugin.xml file.

Procedure

In-Browser

  1. In the Project Navigator, expand Plugins.
  2. Locate plugin.xml for your Apache Cordova plugin and double-click to open it.
  3. In the markup of plugin.xml, locate block comments for Apache Cordova versions.
    Look for code for Apache Cordova versions that do not match the target Apache Cordova version for your app.

    For example:

    <!-- Only for Apache Cordova 2.2.0 -->
    <plugins-plist key="Plugin" string="CDVPlugin" />
    
  4. Comment out or delete the block comment and the corresponding lines of code.
  5. Press Ctrl+Shift+S to save all changes.
  6. Configure the values of the plugin variables for the plugin, if any.
    1. In the Project Navigator, double-click Properties.
    2. Locate your plugin.
    3. Click Expand for the newly added plugin to expand its configuration options.
    4. Click Configuration Variables.
    5. Select the build configuration to which you want to apply the plugin variables.
    6. Provide values for the listed variables and click Done.
    7. Close the properties dialog.

Universal

  1. In the Project Navigator, expand Plugins.
  2. Locate plugin.xml for your Apache Cordova plugin and double-click to open it.
  3. In the markup of plugin.xml, locate block comments for Apache Cordova versions.
    Look for code for Apache Cordova versions that do not match the target Apache Cordova version for your app.

    For example:

    <!-- Only for Apache Cordova 2.2.0 -->
    <plugins-plist key="Plugin" string="CDVPlugin" />
    
  4. Comment out or delete the block comment and the corresponding lines of code.
  5. Press Ctrl+Shift+S to save all changes.
  6. Configure the values of the plugin variables for the plugin, if any.
    1. In the Project Navigator, double-click Properties.
    2. Locate your plugin.
    3. Click Expand for the newly added plugin to expand its configuration options.
    4. Click Configuration Variables.
    5. Select the build configuration to which you want to apply the plugin variables.
    6. Provide values for the listed variables and click Done.
    7. Close the properties dialog.

Windows

  1. In the Project Navigator, double-click Properties.
  2. In the Plugins tab, navigate to the Other Plugins section and expand it, if needed.
  3. Locate your plugin and click View.
  4. In the markup of plugin.xml, locate block comments for Apache Cordova versions.
    Look for code for Apache Cordova versions that do not match the target Apache Cordova version for your app.

    For example:

    <!-- Only for Apache Cordova 2.2.0 -->
    <plugins-plist key="Plugin" string="CDVPlugin" />
    
  5. Comment out or delete the block comment and the corresponding lines of code.
  6. Press Ctrl+Shift+S to save all changes.
  7. Configure the values of the plugin variables for the plugin, if any.
    1. In the Project Navigator, double-click Properties.
    2. Locate your plugin in the Core Plugins or Other Plugins section.
    3. Click Expand for the newly added plugin to expand its configuration options.
    4. Click Configure.
    5. Select the build configuration to which you want to apply the plugin variables.
    6. Provide values for the listed variables and click Close.
  8. Press Ctrl+S to save your changes.
  9. Close the properties dialog.

Visual Studio

  1. In the Solution Explorer pane, double-click Properties.
  2. In the Plugins tab, navigate to the Other Plugins section and expand it, if needed.
  3. Locate your plugin and click View.
  4. In the markup of plugin.xml, locate block comments for Apache Cordova versions.
    Look for code for Apache Cordova versions that do not match the target Apache Cordova version for your app.

    For example:

    <!-- Only for Apache Cordova 2.2.0 -->
    <plugins-plist key="Plugin" string="CDVPlugin" />
    
  5. Comment out or delete the block comment and the corresponding lines of code.
  6. Press Ctrl+Shift+S to save all changes.
  7. Configure the values of the plugin variables for the plugin, if any.
    1. In the Solution Explorer, double-click Properties.
    2. Locate your plugin in the Core Plugins or Other Plugins section.
    3. Click + for the newly added plugin to expand its configuration options.
    4. Click Configure.
    5. Select the build configuration to which you want to apply the plugin variables.
    6. Provide values for the listed variables and click Close.
    7. Press Ctrl+S to save your changes.
  8. Close the properties dialog.

CLI

  1. On your local file system, open the directory that contains your app and navigate to the Plugins subdirectory.
  2. Locate plugin.xml for your Apache Cordova plugin and double-click to open it.
  3. In the markup of plugin.xml, locate block comments for Apache Cordova versions.
    Look for code for Apache Cordova versions that do not match the target Apache Cordova version for your app.

    For example:

    <!-- Only for Apache Cordova 2.2.0 -->
    <plugins-plist key="Plugin" string="CDVPlugin" />
    
  4. Comment out or delete the block comment and the corresponding lines of code.
  5. In the markup of plugin.xml, locate the <preference> elements that contain variable declarations in the following format.

    $VARIABLE_IN_CAPITAL_LETTERS$
    
  6. Replace any $VARIABLE_IN_CAPITAL_LETTERS$ strings with the values for your plugin variables.
  7. Save changes.

Next Steps

Run on device or distribute your app.

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.