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

Multiple edit-config items for Info.plist causing error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.1.0
    • Fix Version/s: None
    • Component/s: cordova-cli
    • Labels:
      None

      Description

      I've updated `cordova-ios` to 4.5.3 and `cordova-plugin-contacts` to 3.0.0, I've got the following
      working:

      <edit-config file="*-Info.plist" mode="merge" target="NSContactsUsageDescription">
          <string>We require permission to access your contacts so you can import contacts into [redacted]</string>
      </edit-config>
      

      However when I decided to move some stuff from an `after_prepare` hook script, to use edit-config, it fails with an error `doc.find is not a function`

      <edit-config file="*-Info.plist" mode="merge" target="NSContactsUsageDescription">
          <string>We require permission to access your contacts so you can import contacts into [redacted]</string>
      </edit-config>
      <edit-config file="*-Info.plist" mode="merge" target="UIStatusBarStyle">
          <string>UIStatusBarStyleLightContent</string>
      </edit-config>
      

      If I take out the additional `<edit-config>` everything works.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tombell Tom Bell
              • Votes:
                13 Vote for this issue
                Watchers:
                18 Start watching this issue

                Dates

                • Created:
                  Updated: