I am trying to develop a basic hello world application with phonegap on Xcode. But i can not see the log messages on Xcode console. I have tried console.log and debug.log but they did not worked for me?
How can i see javascript log messages on xcode console?
In later versions of phonegap/cordova, to add the debug console plugin in your project:
cordova plugin add org.apache.cordova.console
In my case, i just needed to comment the following lines in the cordova.js :
Problem
The following or a similar error message occurs when adding the console plugin to the ios platform (or after reinstalling) via Command-line Interface:
Solution
Open your Xcode project and go to the tab "Build Phases". Now open the drop-down named "Compile Sources". Click on the "+" sign at the end of the list and add "CDVLogger.m" or any other missing source.
Settings > Safari > Advanced
and turn onWeb Inspector
.Safari > Preferences > Advanced
and select theShow develop menu in menu bar
checkbox.Develop