PushPlugin - PushNotification.js build error

  • 1
  • Problem
  • Updated 6 years ago
I am trying to setup Push Notifications using PushWoosh. I have added the following lines to my config.xml:

The first one (pushwoosh) works fine, however it requires pushnotification.js. If I include that second line above (pushplugin) I get the following error message when I build my app:

Error - A plugin asset was found in your app (remove any plugin assets from your app as they will be injected by Build): PushNotification.js

This file is NOT included in my build but yet it is telling me that it is failing due to it being included.

Please advise.
Photo of Chris Paulson

Chris Paulson

  • 13 Posts
  • 0 Reply Likes

Posted 7 years ago

  • 1
Photo of Abe

Abe

  • 87 Posts
  • 3 Reply Likes
Use < code> tags so we can see your code.
Photo of Chris Paulson

Chris Paulson

  • 13 Posts
  • 0 Reply Likes

<gap:plugin name="com.pushwoosh.plugins.pushwoosh" />
<gap:plugin name="com.phonegap.plugins.pushplugin" />


It is the second one (pushplugin) that causes the error.
Photo of Abe

Abe

  • 87 Posts
  • 3 Reply Likes
If you want to use Pushwoosh, why are you including the second plugin? Because you need PushNotification.js? I would assume that PushNotification.js is different for each of these plugins anyway. Maybe they are overwriting each other's js file?

I haven't used Pushwoosh but all PGB plugins should include the required JS files by themselves. What happens when you only use the pushwoosh plugin?

Probably pushwoosh also needs you to have this:
<script type="text/javascript" src="PushNotification.js"</script>

But it will include the actual file into your build. That's how PushPlugin does it.
Photo of Chris Paulson

Chris Paulson

  • 13 Posts
  • 0 Reply Likes
I have tried doing that and still get the same error message when I try to compile my build:

Error - A plugin asset was found in your app (remove any plugin assets from your app as they will be injected by Build): PushNotification.js
Photo of Abe

Abe

  • 87 Posts
  • 3 Reply Likes
You'll need help from someone who has used the PushWoosh plugin (please change the title of this thread if you can to PushWoosh instead of PushPlugin).

Or maybe PGB support can look at your app and help you..
Photo of Zahir

Zahir

  • 3500 Posts
  • 40 Reply Likes
Hi Chris,

Would you mind updating us on your current progress?
Thanks.
Photo of Zahir

Zahir

  • 3500 Posts
  • 40 Reply Likes
Due to the thread inactivity, this issue is now closed.
Create a new issue if you have any other problem with PhoneGap Build.
Thanks

This conversation is no longer open for comments or replies.