Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13979

getEditConfigs() and getConfigFiles() only work for the first <platform> tag

    XMLWordPrintableJSON

Details

    Description

      I ran into something strange - my configuration would change based on the ordering of elements in config.xml.

      Looking at the source code, the culprit is getEditConfigs() and getConfigFiles() in ConfigParser.js. Unlike the rest of the code they only look in the first platform tag for config directives:

      var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');
      var platform_edit_configs = platform_tag ? platform_tag.findall('edit-config') : [];

      This should probably be something like this instead (untested):

      var platform_edit_configs = this.doc.findall('./platform[@name="' + platform + '"]/edit-config');

      And similarly for getConfigFiles().

      Attachments

        Issue Links

          Activity

            People

              dpogue Darryl Pogue
              marfire Kevin Christopher Henry
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: