1

I am using Ubuntu(15.10) 64-bit system and I use chrome for my logs.

I am trying to do android push notification and http://docs.ionic.io/v1.0/docs/push-from-scratch# using this ionic doc i am trying to do push notification.

when try to install ionic plugin add phonegap-plugin-push I am getting error like Error: Variable(s) missing (use: --variable SENDER_ID=value). why this error occurs can any one give me a solution to solve this.

2 Answers2

1

As you can see on the installation docs for this plugin (https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md) you have to supply a SENDER_ID variable upon installation like this:

ionic plugin add phonegap-plugin-push --variable SENDER_ID="your-app-id"

So if you want to support Android devices, your first step would be to go here:

https://console.developers.google.com/iam-admin/projects

and create a new Project. The name you supply there (e.g. "your-app-id") should match the one you pass to the installation command as SENDER_ID.

In case you don't care about Android, it does not matter what you pass there, anything is fine.

phonegap plugin add phonegap-plugin-push --variable SENDER_ID="XXXXXXX"
Rocco
  • 91
  • 7
0

In your main config.xml add

<gap:plugin name="phonegap-plugin-push" source="npm" spec="1.5.3" />

by removing

<gap:plugin name="phonegap-plugin-push" source="npm" />

and it should work.

Muhammad Husnain Tahir
  • 1,009
  • 1
  • 15
  • 28
  • i have searched all the places in config.xml but i am not able to find –  Apr 06 '16 at 07:19