2

phonegap-plugin-push 2.0.0 "PushPlugin"

I updated phonegap-plugin-push to 2.0.0. And on the documentation it says

"As of version 2.0.0 the SENDER_ID parameter has been removed at install time. Instead you put your google-services.json (Android) and/or GoogleService-Info.plist in the root folder of your project and then add the following lines into your config.xml."

So in my config.xml, I have:

enter image description here

enter image description here

And I also created those files to my project folder:

enter image description here

But then I don't know what to write in those two files! I want to write SENDER_ID="1234567" in those files, but in what format?

The doc doesn't have an example for putting in SENDER_ID on those files.

Help!

Andre Song
  • 353
  • 1
  • 4
  • 14

2 Answers2

1

You don't have to write those file on your own!!

In my case, I use FCM to send push notifications and I downloaded them from the FCM portal. Are you using FCM or something else? Anyway, those files have to be downloaded.

Which push service do you use? FCM, Azure,..?

Further, with the push plugin 2.0.0, make sure you use the phonegap versione "cli-7.0.1".

Piero Alberto
  • 3,823
  • 6
  • 56
  • 108
  • 1
    I use GCM (I need to change to FCM I think!). And as you said, I should've downloaded those files! The link was this one. https://support.google.com/firebase/answer/7015592 – Andre Song Sep 05 '17 at 20:09
0

For the version 2.x, you don't need to add the SENDER_ID while installing the plugin. The plugin parses its own from the Google-service.json and google-service.info.plist file

simply install the plugin using the command

ionic Cordova plugin add phonegap-plugin-push

and after that

npm-install

Abhin Pai
  • 332
  • 3
  • 10