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

edit-config doesn't work with plist files

    XMLWordPrintableJSON

    Details

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

      Description

      Trying to use the edit-config tag in config.xml to add to the iOS Info.plist file:

      <edit-config file="*-Info.plist" target="LSApplicationQueriesSchemes" mode="merge">
          <array>
              <string>foo</string>
          </array>
      </edit-config>

      It's giving me an error in xml_helpers.js:

      Error: TypeError: doc.find is not a function
          at Object.resolveParent (/Users/dpogue/Coding/cordova-app/node_modules/cordova-common/src/util/xml-helpers.js:210:26)
          at /Users/dpogue/Coding/cordova-app/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:464:53
          at Array.forEach (native)
          at is_conflicting (/Users/dpogue/Coding/cordova-app/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:456:17)
          at PlatformMunger.add_config_changes (/Users/dpogue/Coding/cordova-app/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:204:33)
          at /Users/dpogue/Coding/cordova-app/node_modules/cordova-lib/src/cordova/prepare.js:127:24
          at _fulfilled (/Users/dpogue/Coding/cordova-app/platforms/ios/cordova/node_modules/q/q.js:834:54)
          at self.promiseDispatch.done (/Users/dpogue/Coding/cordova-app/platforms/ios/cordova/node_modules/q/q.js:863:30)
          at Promise.promise.promiseDispatch (/Users/dpogue/Coding/cordova-app/platforms/ios/cordova/node_modules/q/q.js:796:13)
          at /Users/dpogue/Coding/cordova-app/platforms/ios/cordova/node_modules/q/q.js:604:44

      This seems to happen because plist files are turned into JS objects when they are parsed, rather than XML documents like AndroidManifest.xml or config.xml.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dpogue Darryl Pogue
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: