Я пытаюсь использовать ChildBrowserPlugin (от https://github.com/purplecabbage/phonegap-plugins) PhoneGap 1.0.0 и X-Code 4.
но выдает ошибку. Даже я добавил
ключ: 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 :');
}