Muhammad Qasim
Muhammad Qasim

Reputation: 361

Notification plugin not working phonegap 3.0 for iphone

I am developing an app with phonegap 3.0.0. I need to show the confirm dialog so I added the Notification plugin from phonegap CLI with the following command (as described in CLI Documentation):

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

But now I can't build the project. When I try to build it fails with following error:

** 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

When I remove the Notification plugin everything works fine. I've also tried to add the following in my config.xml (CamTest/www/config.xml) to no effect:

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

Please someone tell me how to work with plugins in Phonegap 3.0.0. I am trying it on iphone simulator. Thanks.

Upvotes: 1

Views: 349

Answers (1)

Ozair Kafray
Ozair Kafray

Reputation: 13539

We were facing the same problem, but before we added the required lines in config.xml. So, the following two step process also mentioned in this and this link solved the problem.

  1. On the command line

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

  1. In project's config.xml
<feature name="Notification">
    <param name="ios-package" value="CDVNotification" />
</feature>

Upvotes: 1

Related Questions