【问题标题】:iOS phonegap plugin : ChildBrowserCommand (pluginName: ChildBrowserCommand) does not existiOS phonegap 插件:ChildBrowserCommand (pluginName: ChildBrowserCommand) 不存在
【发布时间】:2011-10-03 10:57:35
【问题描述】:

我正在尝试使用 phonegap 1.0.0 和 X-Code 4 的 ChildBrowserPlugin(来自 https://github.com/purplecabbage/phonegap-plugins)。

但它给出了错误。连我都加了
键 : 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 文件中。也许你有一个额外的空间或什么?还有另一件事可能会有所帮助:尝试清理项目,也许会有所帮助( Product -> Clean )?
  • 问题已解决...未正确包含目标 C 文件。 ....我删除文件的引用并重新包含它..然后工作正常...相关帖子:github.com/purplecabbage/phonegap-plugins/issues/35

标签: ios xcode4 cordova


【解决方案1】:

问题已解决
未正确包含目标 C 文件。
我删除了文件的引用并重新包含它。然后工作正常...
相关帖子:https://github.com/purplecabbage/phonegap-plugins/issues/35

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-19
    • 2023-04-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-26
    相关资源
    最近更新 更多