iOS 和 PhoneGap 的问题
刚刚开始尝试使用 PhoneGap 将我的 html、css、javascript 文件适应 iOS(我也尝试过 NimbleKit,但结果是相同的)。我有一个最初为 Blackberry Playbook 编写的 Web 应用程序。该应用程序在 Playbook 以及 Chrome 和 Safari 中运行良好。但是,当我尝试使用 PhoneGap 通过 XCode 运行它时,该应用程序显示在模拟器上,但似乎无法正确运行数据库编码(至少我认为这是问题所在)。我没有收到任何构建错误。
从文档来看,NimbleKit似乎只支持它自己的内部SQLite,但PhoneGap似乎支持WebDB,这是我的数据库编写的。
最后,模拟器似乎没有运行我拥有的一些全局变量(我知道,我知道,不要使用全局变量)尽管这可能是因为它们出现在我的 javascript 文件开头的数据库初始化之后。
任何正确方向的想法或观点都会非常有帮助。即使是一些可以帮助我在 iOS sim 中调试应用程序的文档。
提前致谢。
Just started trying to adapt my html, css, javascript files to iOS using PhoneGap (I've also tried NimbleKit but the result is the same). I have a web app that I originally wrote for the Blackberry Playbook. The app works fine on the Playbook and in Chrome and Safari. However, when I try and run it through XCode with PhoneGap, the app displays on the simulator but does not seem to properly run the database coding (at least I think that is the problem). I do not get any build errors.
From the documentation, NimbleKit seems to just support its own internal SQLite, but PhoneGap seems to support WebDB, which is what my database is written in.
Finally, the simulator doesn't seem to run some global variables I have (I know, I know, don't use global variables) although that could be because they appear just after my DB initialization at the beginning of my javascript file.
Any thoughts or points in the right direction would be very helpful. Even if it is to some documentation which can help me debug the app in the iOS sim.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你的问题与此有关吗?
http://phonegap。 com/2012/04/18/ios-5-1-and-the-embedded-uiwebview-with-cordova/
Cold your problem be related to this?
http://phonegap.com/2012/04/18/ios-5-1-and-the-embedded-uiwebview-with-cordova/
上周我在使用 PhoneGap 和 iOS Simulator 时遇到了类似的问题,
我写的所有代码似乎都没有问题,
无论如何我尝试了这个 远程 Web 检查器,并尝试创建一个使用 Safari Javascript 控制台远程数据库,
我发现我无法使用 iPhone 模拟器创建 Web 数据库,
看起来您需要将应用程序部署到您的设备上才能使用它。
我可能是错的,但这就是我发现的。
I was facing a similar problem with PhoneGap and iOS Simulator last week,
all the code i wrote seem to have no problem,
anyway i tried this remote web inspector, and tried to create a database remotely using Safari Javascript Console,
bottom line I found that I was not able to create web database using iPhone Simulator,
looks like you need to deploy your app onto your device to make use of it.
I might be wrong, but that was what I found.