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

Config.xml changes cannot be made inside pre-prepare hook

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6.0
    • Fix Version/s: None
    • Component/s: cordova-lib
    • Labels:
      None

      Description

      If your pre-prepare hook modifies the top-level application config.xml, those changes will not be reflected until the next prepare.

      The reason is that cordova-lib incorrectly reads the state of the config file right at the state of prepare, before running pre-prepare hooks. Since the content isn't actually used until after the pre-prepare hooks are fired, the fix is trivial, just read the file later hooks fire!

        Attachments

          Activity

            People

            • Assignee:
              mmocny Michal Mocny
              Reporter:
              mmocny Michal Mocny
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: