通知插件无法正常使用phonegap 3.0 for iphone

时间:2013-10-22 13:14:44

标签: iphone cordova phonegap-plugins

我正在开发一个带有phonegap 3.0.0的应用程序。我需要显示确认对话框,所以我使用以下命令从phonegap CLI添加了Notification插件(如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

当我删除Notification插件时,一切正常。我也尝试在我的config.xml(CamTest / www / config.xml)中添加以下内容无效:

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

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

1 个答案:

答案 0 :(得分:1)

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

  1. 在命令行上
  2.   

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

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