Note that there are some explanatory texts on larger screens.

plurals
  1. POcordova / phonegap 3.0 device properties
    primarykey
    data
    text
    <p>I am new to phonegap / cordova 3.0 and it seems that I have a similar problem as <a href="https://stackoverflow.com/questions/17870803/phonegap-help-device-properties-cordova-v-phonegap-xcode-debugging">PhoneGap Help: device properties, cordova v phonegap, xcode debugging</a>. Unfortunately I couldn't find a solution in the internet by now.</p> <p>After having created the Hello World example for ios everything works fine in the simulator. But after having changed the content in the index.html with the code of the example given for device properties in den documentation the screen of the simulator shows only "Loading device properties.." Nothing more. For some reason the function onDeviceReady() does not work properly. Any help is highly appreciated </p> <p>Here is the code of index.html for the device properties</p> <pre><code>&lt;!DOCTYPE html&gt; </code></pre> <p> Device Properties Example</p> <pre><code> &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" charset="utf-8"&gt; // Wait for device API libraries to load // document.addEventListener("deviceready", onDeviceReady, false); // device APIs are available // function onDeviceReady() { var element = document.getElementById('deviceProperties'); element.innerHTML = 'Device Name: ' + device.name + '&lt;br /&gt;' + 'Device Cordova: ' + device.cordova + '&lt;br /&gt;' + 'Device Platform: ' + device.platform + '&lt;br /&gt;' + 'Device UUID: ' + device.uuid + '&lt;br /&gt;' + 'Device Model: ' + device.model + '&lt;br /&gt;' + 'Device Version: ' + device.version + '&lt;br /&gt;'; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;p id="deviceProperties"&gt;Loading device properties...&lt;/p&gt; &lt;/body&gt; </code></pre> <p></p> <p><img src="https://i.stack.imgur.com/tbwYn.png" alt="screenhot of xcode and simulator"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload