I've got a PhoneGap app that won't run the "deviceready" event on an iPhone but WILL run it on Android.
Any ideas why is this? or how to fix it?
(PhoneGap ver 1.0)
The code is :
function onBodyLoad()
{
if (typeof navigator.device == "undefined"){
document.addEventListener("deviceready", onDeviceReady, false);
} else {
onDeviceReady();
}
}
<body onload="onBodyLoad()">
Thanks!
Did you just copy your www folder from one to the other? Android and iOS use their own phonegap-1.0.0.js file. Make sure you are using the correct js file for the platform.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With