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

Crash occurs because plugman adds extra information in iOS Info.plist when installing a plugin

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • Master
    • 3.2.0
    • cordova-plugman
    • None

    Description

      See attached .original.plist and .after-plugman.plist.

      The plugin.xml used is: https://github.com/apache/cordova-labs/blob/86fb3afef5aaaba8e82e5bf0719b74b4a07582e0/statusbar/plugin.xml
      (note the value it tries to add in the iOS Info.plist).

      What plugman does is, it adds extra info (newlines, spaces) as the string value for the keys NSMainNibFile and NSMainNibFile~ipad in Info.plist. They had no values before. At runtime, iOS will search for these "values" and not finding the .nib files to load, then crash.

      This is critical for plugins that need to modify the Info.plist, like the Facebook PhoneGap plugin. There was a pull request for this, but I don't know why it was closed exactly: https://github.com/apache/cordova-plugman/pull/21

      Expected:
      plugman should not modify plist keys that have empty string values.

      Actual:
      plugman adds a newline, 6 spaces, and another newline for keys that have empty string values.

      Attachments

        1. KeyboardTest-Info.original.plist
          2 kB
          Shazron Abdullah
        2. KeyboardTest-Info.after-plugman.plist
          2 kB
          Shazron Abdullah

        Issue Links

          Activity

            People

              goya David Brett Rudd
              shazron Shazron Abdullah
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: