Search code examples
cordovaionic-frameworkphonegap-plugins

Ionic - installing push plugin gives error


I am trying to install push notification plugin for ionic app, by following this docs, but I get an error when I run:

ionic plugin add phonegap-plugin-push

The error:

Error: Variable(s) missing (use: --variable SENDER_ID=value).


Solution

  • It's mandatory --variable SENDER_ID. Do you have sender_id for Android? otherwise you can simply do:

    ionic plugin add phonegap-plugin-push --variable SENDER_ID="XXXXXXX"
    

    if you have problems check the doc