console.log在iOS PhoneGap 3.0应用程序中不工作 [英] console.log not working in an iOS PhoneGap 3.0 app
问题描述
我将应用从PhoneGap 1.9升级到PhoneGap 3.0。 console.log()函数不再工作。以前,输出是在XCode控制台中编写的。什么是恢复日志功能的最佳方法?
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 the best way to restore the logging feature?
我读过: PhoneGap 2.0不显示console.log在XCode ,但在PhoneGap 3.0 console.log即使在deviceReady事件后也不工作。
I have read: PhoneGap 2.0 doesn't show console.log in XCode but in PhoneGap 3.0 console.log does not work even after the deviceReady event.
我也有兴趣在xcode直接看到javascript错误。
I am also interested to see the javascript errors directly in xcode.
推荐答案
您需要将调试控制台插件添加到您的项目中:
You need the debug console plugin added to your project:
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git
在以后的版本中phonegap / cordova,在您的项目中添加调试控制台插件:
In later versions of phonegap/cordova, to add the debug console plugin in your project:
cordova插件添加org.apache.cordova.console
这篇关于console.log在iOS PhoneGap 3.0应用程序中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!