Should I report this Cordova bug to github?

  • Hi, I can’t get Cordova wrappers/builds to work correctly out of the box (only building for iPhone at the moment), but I have a workaround which DOES allow it to work, and it involves adding code to the index.html file in my dist build folder.

    Here is the code I need to add to index.html every time so that plugins will work:

    <script type=text/javascript src=cordova.js>
    <script type=text/javascript>
    document.addEventListener("deviceready", onDeviceReady, false);
    function onDeviceReady() {

    without this, my projects will build, but they won’t use any cordova plugins (like statusbar). Or is there some other trick to getting plugins working in cordova that I am missing? If so, I am all ears.

  • Admin

    Quasar takes of Cordova integration automatically. It adds that script tag and waits for deviceready event to be triggered (through Quasar.start(...)). You don’t need to manually add this.

    Check the default template.

  • Believe me, it will not run properly unless I take this extra step. If I leave it out, and let it build (rather, let quasar build, because it is a result of that process I need to modify) run its course, and then build with what it is using by default, I will not have access to cordova plugin functionality. This results in things like the toolbar crashing into the status bar (which is fixed by a normally working cordova statusbar plugin). So I just added my code to the default index.html file in src, and it works the same way as if I add it after the build, but you seem to indicate this should not be necessary. I have tried a bunch of ways without and it refuses to run properly in cordova builds for ios without it.

  • This post is deleted!

Log in to reply

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.