Question

I tried everything ... I even build Demo Apps, but I don't get the device ready callback on my iPhone 5S

The Javascript Code looks like this

        function onBodyLoad() {
                  document.addEventListener("deviceready",
                    onDeviceReady, false);
                }

function onDeviceReady() {
            alert("ready");
    }

and the HTML looks like this

<html>
  <head>

    <script src="js/leaflet.js"></script>
    <script src="js/ratchet.js"></script> 
    <script src="js/main.js"></script>

  </head>
  <body onload="onBodyLoad()">


<div class="content">
Blabla
</div>

  </body>
</html>

I've also added the Device Plugin for Cordova / Phonegap in the config.xml.

 <gap:plugin name="org.apache.cordova.device" />

I don't use Xcode or anything else. Sorry, but i'm a complete newbie to this. Being a designer i was just looking for a quick way to do apps. Which i kinda found, but as you can see with some problems.

Was it helpful?

Solution

At least based on the code above, you didn't include the call to cordova.js:

<script src="cordova.js"></script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top