4 Replies Latest reply on Jan 31, 2017 8:08 AM by ab61460670

    Only certain Cordova plugins' module.exports are recognized in Sencha Touch code

    ab61460670

      I recently started using PhoneGap to distribute my Sencha Touch app, and I've been running into problems utilizing plugins.

       

       

      Each plugin has a JavaScript file where they can specify an object (or any JavaScript variable) to make available outside the scope of the file, for the purpose of exporting the functionality of the plugin for external use. This is achieved by assigning a variable called module.exports the intended object.

       

       

      Each plugin also has a plugin.xml file, which can have a "js-module" element that allows you to assign a JS file's module.exports to whatever variable name you'd like.

       

       

      I've gone through each plugin I have and gathered a list of the variables that should be available by the time the deviceready event of PhoneGap fires. But I've found that, save for a select few plugins, these variables are not available although they should be.

       

       

      I was wondering if anyone could shed some light on what might be going wrong? Or even point in the right direction? I'm not sure how the inner mechanisms of this process work so being able to take a look at it could help.

       

       

      Thank you.