I am upgrading an app from PhoneGap 1.9 to PhoneGap 3.0. The console.log() function is not working anymore. Previously, the ouput was written in the XCode console. What\'s t
It turned out, at least in my case, that deviceready function for the logger was not getting called. The final line in logger.js.
document.addEventListener("deviceready", logger.__onDeviceReady, false);
The solution (or really a work-around) is to call the logger.__onDeviceReady function from your deviceready listener function:
function onDeviceReady() {
if (window.cordova.logger) {
window.cordova.logger.__onDeviceReady();
}
}
document.addEventListener('deviceready', onDeviceReady, false);