[英]Cordova iOS: Alert-Popups and Device-Ready is not firing
I just set up a new PhoneGap project for android, which worked perfectly fine without any problems, there were almost no changes to the template project. 我刚刚为android设置了一个新的PhoneGap项目,该项目运行正常,没有任何问题,模板项目几乎没有变化。
Then I wanted to move that exact project to iOS, and the woes began. 然后我想将确切的项目移至iOS,然后开始陷入困境。
When I start the project, suddenly a bunch of alter dialogs pop up, with device information, network status. 当我启动项目时,突然弹出一堆alter对话框,其中包含设备信息,网络状态。 Each offer me "ok" and "cancel". 每个都给我“确定”和“取消”。 When I press "ok" on any of them, execution is halted, and nothing happens further. 当我在其中任何一个上按“确定”时,执行都将停止,此后再也没有发生任何事情。
When I cancel them all, I get to the project screen, where it says "connecting to device". 当我全部取消后,进入项目屏幕,显示“正在连接设备”。 Obviously, deviceready
is never fired on this. 显然,从不触发deviceready
。
Since this project is merely the template offered by Cordova themselves, I find it hard to believe it is not supposed to run. 由于该项目仅仅是Cordova自己提供的模板,所以我很难相信它不应该运行。 I suspect the console.log
messages get popped up on screen rather than the XCode debug window. 我怀疑console.log
消息会弹出而不是XCode调试窗口。
I am completely new to XCode or any iOS programming (hence PhoneGap), and I would appreciate any help. 我完全不熟悉XCode或任何iOS编程(因此称为PhoneGap),因此对您有所帮助。
Using Cordova 2.8.1. 使用Cordova 2.8.1。
原因是我将Android的cordova.js
错误地复制到ios项目中,请参见此处 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.