我想使用ChildBrowserPlugin(從https://github.com/purplecabbage/phonegap-plugins)的PhoneGap 1.0.0和X-代碼4.iOS的PhoneGap的插件:ChildBrowserCommand(pluginName:ChildBrowserCommand)不存在
,但它給錯誤。即使我已經加入
鍵:ChildBrowserCommand
字符串:ChildBrowserCommand
在PhoneGap.plist
2011-10-03 16:17:06.530 samplePlugins[3913:40b] PGPlugin class ChildBrowserCommand (pluginName: ChildBrowserCommand) does not exist.
2011-10-03 16:17:06.531 samplePlugins[3913:40b] ERROR: Plugin 'ChildBrowserCommand' not found, or is not a PGPlugin. Check your plugin mapping in PhoneGap.plist.
誰能幫我什麼是錯的我的設置或代碼。
我把ChildBrowser.js在WWW文件夾
的index.html
<script type="text/javascript" charset="utf-8" src="ChildBrowser.js"></script>
function onDeviceReady()
{
var cb = ChildBrowser.install();
if(cb != null)
{
cb.onLocationChange = function(loc){ root.locChanged(loc); };
cb.onClose = function(){root.onCloseBrowser()};
cb.onOpenExternal = function(){root.onOpenExternal();};
window.plugins.childBrowser.showWebPage("http://google.com");
}
}
function onLocationChange(loc) {
navigator.notification.alert('Change to URL : '+loc);
}
function onClose() {
navigator.notification.alert('onClose :');
}
function onOpenExternal() {
navigator.notification.alert('onOpenExternal :');
}
這對我來說很好。看起來錯誤在PhoneGap.plist文件中。也許你有額外的空間或東西?還有一件可能有用的事情:嘗試清理一個項目,也許這會有所幫助(產品 - >清潔)? –
問題已解決... 目標C文件沒有正確包含。 .... 我刪除文件的參考,並重新包括它..然後工作正常... 分享到:相關文章:https://github.com/purplecabbage/phonegap-plugins/issues/35 –