No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Cordova undefined on iOS

    Help
    6
    26
    10087
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rstoenescu
      rstoenescu Admin last edited by

      @Martin Ok, now I know what’s this about. Can you share your repo to see the exact use case of your Modal pls? A private link or something. You’re on an edge case and I’d like to fix that also. Thanks!

      1 Reply Last reply Reply Quote 0
      • Martin
        Martin last edited by

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

        1 Reply Last reply Reply Quote 0
        • rstoenescu
          rstoenescu Admin last edited by

          razvan.stoenescu@gmail.com

          1 Reply Last reply Reply Quote 0
          • rstoenescu
            rstoenescu Admin last edited by

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

            1 Reply Last reply Reply Quote 0
            • rstoenescu
              rstoenescu Admin last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • rstoenescu
                rstoenescu Admin last edited by

                Quasar v0.13 is out so this is fixed.

                1 Reply Last reply Reply Quote 0
                • Gianni
                  Gianni last edited by

                  I got the same Cordova error here.

                  I installed quasar-framework v0.13

                  What i was trying is to use this plugin :
                  window.cordova.plugins.insomnia.keepAwake()

                  I also tried to call it without window
                  cordova.plugins.insomnia.keepAwake()

                  Cordova is wrapped and the JS files are located at the right place
                  ./cordova/platforms/android/assets/www/cordova.js
                  ./cordova/platforms/android/platform_www/cordova.js
                  ./cordova/platforms/ios/CordovaLib/cordova.js
                  ./cordova/platforms/ios/platform_www/cordova.js
                  ./cordova/platforms/ios/www/cordova.js

                  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 ?

                  1 Reply Last reply Reply Quote 0
                  • Gianni
                    Gianni last edited by

                    0_1485985917626_Screen Shot 2017-02-01 at 22.45.12.1.png

                    1 Reply Last reply Reply Quote 1
                    • rstoenescu
                      rstoenescu Admin last edited by rstoenescu

                      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: http://quasar-framework.org/guide/quasar-play-app.html

                      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.

                      1 Reply Last reply Reply Quote 0
                      • Gianni
                        Gianni last edited by

                        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 :
                        window.plugins.insomnia.keepAwake()
                        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.
                        navigator.vibrate(300)

                        1 Reply Last reply Reply Quote 0
                        • rstoenescu
                          rstoenescu Admin last edited by

                          Navigator Vibrate causes no problems because it’s a Web API: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post