作者:吴台吉国瑋智仁 | 来源:互联网 | 2023-07-08 22:09
I'm working on an app I want to host in iOS via Cordova (PhoneGap). I've run into some problem when I try to access the device.platform and device.version properties. I'm not sure what the problem is. Either way, I can't figure out how to peek into the code to get a better idea of what's going on.
我正在开发一个我想通过Cordova(PhoneGap)在iOS上托管的应用程序。当我尝试访问device.platform和device.version属性时,我遇到了一些问题。我不确定问题是什么。无论哪种方式,我都无法弄清楚如何窥探代码以更好地了解正在发生的事情。
I thought I could just fire up the .html in the desktop version of Safari, however, that didn't provide any insights. In short:
我想我可以在Safari的桌面版本中启动.html,然而,这并没有提供任何见解。简而言之:
- How do I debug code running inside of Cordova?
如何调试Cordova内部运行的代码?
- Any ideas why I can't just do a "alert(device.platform);"?
任何想法为什么我不能只做一个“警报(device.platform);”?
Thank you!
3 个解决方案