Cordova undefined on iOS

  • Ok I’ve set up a rep for you. What email address can I send the link to?

  • Admin

  • Admin

    Oops, “The owner of this repository (skilldance) is already at their plan limit and will need to upgrade before adding more users.”

  • Admin

    Ok, discussed with Martin in private. He helped me reproduce his use case and pushed fix for it. Quasar edge has it and v0.13 (next immediate version) will too.

  • Admin

    Quasar v0.13 is out so this is fixed.

  • I got the same Cordova error here.

    I installed quasar-framework v0.13

    What i was trying is to use this plugin :

    I also tried to call it without window

    Cordova is wrapped and the JS files are located at the right place

    It does not work in the Browser nor in the Play App.
    I ran the quasar with this command : PORT=9000 quasar dev mat -p

    Is there a way to check if cordova got included properly? Or do i need to import or initialise it somehow ?

  • 0_1485985917626_Screen Shot 2017-02-01 at

  • Admin

    Cordova is not accessible in the browser on your desktop. It must be run from an actual cordova app. As for viewing your app in Quasar Play, due to technical limitations you won’t be able to access “cordova” global. This is documented at the bottom of the page here:

    IMPORTANT. While playing with your App in Quasar Play, Cordova functionality will currently not be available. This is due to Cordova Javascript code causing a crash in its Java container.

    What you need to do is build your app, wrap it with cordova and run in on an actual device. Doing this will give you access to the “cordova” global. Also make sure that in the cordova wrapper folder you install the cordova plugins that you use.

  • Thank you for your help!

    ah ok … that makes sense now. It would be grate to place this note on the cordova wrapper site too.
    I hope it will be available one time, since i have to uncomment all cordova plugin calls to develop in my browser.

    So on my device i have access to the cordova object now. i call the plugin as follow :
    this crashes the browser with : Uncaught TypeError: Cannot read property ‘insomnia’ of undefined

    Bit it works on my Hardware. The phone keeps awake.

    interesting: this call causes no problems at all in the browser.

  • Admin

    Navigator Vibrate causes no problems because it’s a Web API:

Log in to reply