Childbrowser 无法在 ios PhoneGap 1.3 中打开网页
我们使用 childbrowser 在 iOS 应用程序中打开 pdf 文件已经有一段时间了,没有任何问题。最近,我们决定在 childbrowser 中打开一个在 safari 中打开的网页,因此我将 pdf 特定代码从原始网页打开代码中分离出来,并尝试让该窗口出现。当然,这是行不通的。经过一段时间的尝试让它工作后,我决定制作一个空白的phonegap项目,放入childbrowser插件并让它去google(如示例中所示)。
新的phonegap 1.3项目,添加了新的childbrowser插件(在xcode中作为插件文件夹中的黄色文件夹),将childbrowser的js添加到www文件夹和index.html,并添加了google.com; ChildBrowser/ChildBrowser.js; ChildBrowserCommand/ChildBrowserCommand 到phonegap.plist。然后我尝试了三种不同的方法,我知道如何尝试打开子浏览器页面(appdelegate中的shouldStartLoadWithRequest,调用子浏览器javascript,或直接使用phonegap.exec调用该方法),但它们都不起作用。
我需要做一些不同的事情才能使 childbrowser 在 1.3 上工作吗?或者我是否缺少使网页正常工作的步骤?
We've been using childbrowser for a while to open pdfs in our ios app with no problems. Recently we decided to open a webpage that we were opening in safari in childbrowser, so I split the pdf specific code off from the original webpage opening code and tried to get the window to come up. This, of course, did not work. After trying for a while to get it to work I decided to just make a blank phonegap project, put the childbrowser plugin in and get it to go to google (as in the example).
New phonegap 1.3 project, new fresh childbrowser plugin added (in xcode as a yellow folder in the plugin folder), js for childbrowser added to www folder and to index.html, and added google.com; ChildBrowser/ChildBrowser.js; ChildBrowserCommand/ChildBrowserCommand to phonegap.plist. Then I tried the three different ways I know how to try to open a childbrowser page (shouldStartLoadWithRequest in appdelegate, call the childbrowser javascript, or call the method directly using phonegap.exec) and none of them worked.
Is there something different I have to do to make childbrowser work for 1.3? Or am I missing a step to get webpages to work in general?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,我发现您需要设置 appdelegate 来将正确的页面发送到 childbrowser,并且您需要使用代码来使用 childbrowser 提交 url。
其次,www.google.com 不起作用,www.google.com/ 起作用。
First off I figured out that you need to both set up appdelegate to sent the proper pages to childbrowser AND you need to use code to submit the url using childbrowser.
Second, www.google.com does not work, www.google.com/ does.