开发者

iOS phonegap plugin : ChildBrowserCommand (pluginName: ChildBrowserCommand) does not exist

I am trying to use ChildBrowserPlugin(from https://github.com/purplecabbage/phonegap-plugins) of phonegap 1.0.0 and X-Code 4.

but i开发者_JS百科t gives error. Even I have added

key : ChildBrowserCommand

string : ChildBrowserCommand

in 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.

Can anyone help me whats is wrong with my setting or code.

I put the ChildBrowser.js in www folder

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 :');
            }


Issue was solved
Objective C files was not included properly.
I delete the reference of files and re include it.. then works fine...
Related post : https://github.com/purplecabbage/phonegap-plugins/issues/35

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜