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

Bug in dynamic loading of a plugin at CDVViewController's registerPlugin method

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: None
    • Component/s: cordova-ios
    • Labels:
      None
    • Environment:

      iOS 6.1

      Description

      When loading a Cordova plugin later on in application run-time with the registerPlugin method, the plugin is not loaded correctly and the plugin cannot be used. This happens when the plugin is not defined in the config.xml. In our project we have a view which runs "widgets" that are downloaded from a server and these widgets use some Cordova plugins, but we don't know beforehand what plugins they use, so we don't want to add them to config.xml.

      Apparently registerPlugin method adds the plugin to pluginObjects but doesn't add it to the pluginsMap. So we have to do a hack and add the plugin to the pluginsMap ourselves after registering the plugin.

        Attachments

          Activity

            People

            • Assignee:
              shazron Shazron Abdullah
              Reporter:
              jukka Jukka Zitting
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: