【问题标题】:Notification plugin not working phonegap 3.0 for iphone通知插件无法正常工作 phonegap 3.0 for iphone
【发布时间】:2013-10-31 09:17:58
【问题描述】:

我正在使用 phonegap 3.0.0 开发应用程序。我需要显示确认对话框,因此我使用以下命令从 phonegap CLI 添加了通知插件(如CLI Documentation 中所述):

$ phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git

但现在我无法构建项目。当我尝试构建它时失败并出现以下错误:

** BUILD FAILED **

The following build commands failed:
  CompileC build/CamTest.build/Debug-iphonesimulator/CamTest.build/Objects-normal/i386/CDVNotification.o CamTest/Plugins/org.apache.cordova.dialogs/CDVNotification.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler

当我删除通知插件时,一切正常。我还尝试在我的 config.xml (CamTest/www/config.xml) 中添加以下内容,但没有效果:

<feature name="Notification">
    <param name="ios-package" value="CDVNotification" />
</feature>

请有人告诉我如何使用 Phonegap 3.0.0 中的插件。我正在iphone模拟器上尝试。谢谢。

【问题讨论】:

  • 你得到什么错误?尝试运行phonegap local build -d 以获取更多调试信息。
  • @MBillau 更新了我的问题。

标签: iphone cordova phonegap-plugins


【解决方案1】:

我们遇到了同样的问题,但在我们在config.xml 中添加所需的行之前。因此,thisthis 链接中也提到的以下两步过程解决了问题。

  1. 在命令行上

$cordova 插件添加 https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git

  1. 在项目的 config.xml 中
<feature name="Notification">
    <param name="ios-package" value="CDVNotification" />
</feature>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-19
    相关资源
    最近更新 更多