I know this is repeated like ton of times but I cannot find the way to resolve it. We have an app running in android with no problems.
But when I install it in my iphone the device ready does not get fired.
The device ready jumps in android but in ios if auto-hide-splash-screen is false it keeps stuck in the splashscreen and deviceready is not fired.
I am making the build with phonegap build.
The version of cordova is 3.7.0
the code of the device ready is
document.addEventListener('deviceready', function() {
alert('listening to device ready'+navigator);
navigator.splashscreen.hide();
}, false);
Try something like :
var onLoad = function(){
document.addEventListener("deviceready", deviceReady, false);
};
var deviceReady = function(){
document.addEventListener("backbutton", exitCordova, false);
alert('listening to device ready'+navigator);
navigator.splashscreen.hide();
};
var exitCordova = function(){
navigator.app.exitApp();
};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.