Cordoba iOS deviceready never works

I have been developing Cordoba apps for several years now and often run into a problem when the "deviceready" event just doesn't fire on iOS.
(This is not a file cordova.jsmissing, which seems to be the only answer that I find on SO).
I am currently using Cordova v6.3.1 , although I had the same problem in many earlier versions.

Of course, others are faced with this problem - I will now try to solve it and will post the answer here.


index.htmlCode example :

<html>
    <body>
        <script src="cordova.js"></script>
        <script>
            document.addEventListener("deviceready", 
               function() { alert('device ready fired!'); }, false);
        </script>
    </body>
</html>
+4
source share
1 answer

iOS, , , .
, , , , :

, ,

cordova ls (. )
corova plugin rm ( )
cordova - ( )

  1. Xcode

  2. ( cordova-ios)

sudo npm install -g cordova
cordova ios @latest

  1. ios

rm ios
add ios

+1

Source: https://habr.com/ru/post/1658058/


All Articles