PhoneGap说ChildBrowser插件不存在

时间:2013-03-11 15:27:16

标签: html ios xcode cordova childbrowser

我正在使用Xcode,PhoneGap和HTML以及ChildBrowser为iPhone开发应用程序。我正在尝试显示从Dropbox检索的PDF(该网站已添加到Cordova.plist中的外部数组列表中)但错误插件'ChildBrowserCommand'未找到,或者不是CDVPlugin。检查您在Cordova.plist中的插件映射是否出现在console中,我不明白什么是错的。在Cordova.plist中,我添加到插件字典中;

enter image description here

JavaScript是;

childbrowser = ChildBrowser.install();

function viewOnline(site) {
  cordova.exec("ChildBrowserCommand.showWebPage", encodeURI(site));
}

和HTML是;

<button onclick="viewOnline('http://dl.dropbox.com/u/97184921/Internship%20Stuff/Holidays.pdf');">View Online</button></li>

我是ChildBrowser的新手,并不真正理解错误的原因;我该如何修复代码?

修改

如果它有帮助,这是控制台中出现的完整错误;

2013-03-11 16:05:00.327 TestApp1 [62039:15b03]错误:找不到插件'ChildBrowser',或者不是CDVPlugin。检查Cordova.plist中的插件映射。

2013-03-11 16:05:00.328 TestApp1 [62039:15b03] - [CDVCommandQueue executePending] [第102行] FAILED pluginJSON = [null,“ChildBrowser”,“showWebPage”,[“{{3 }}“]]

2 个答案:

答案 0 :(得分:0)

从您的plist中删除.js,然后从您的javascript调用中删除Command

答案 1 :(得分:0)

我自己回答了 - 您需要确保所有 ChildBrowser文件都位于Xcode的插件文件夹中(可以在索引下方的屏幕左侧看到) .html文件等 - 最初可能是空的

相关问题