When developing my iOS app using JavaScript, I included cordova.js in my index.html file. The deviceready function is called correctly upon first login, but when I logout and then login again, the device ready event does not trigger.
document.addEventListener("deviceready", onDeviceReady, false);
`function onDeviceReady(){
runningInCordova = true;
}'
How can I reinitialize cordova so that the device ready event fires during login after logout?
My issue arose when using openFB for Facebook login. It worked fine the first time I logged in, but after logging out, I was unable to login again via Facebook. The runningInCordova variable was set to true during the first login and false during logout. How can I resolve this issue? Your help is appreciated.