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


Im trying to start using ionic package but i always get error sender_ID i missing:

ionic package build ios --profile myprofile

Your app has been successfully submitted to Ionic Package!

Then build fails


Fetching plugin “phonegap-plugin-push” via npm
Error: Variable(s) missing (use: --variable SENDER_ID=value).

In my package.json i got

“cordovaPlugins”: [
“variables”: {
“SENDER_ID”: “5850XXX”
“locator”: “phonegap-plugin-push”

I also specified my SENDER ID in config.xml

 <plugin name="phonegap-plugin-push" spec="*">
  <variable name="SENDER_ID" value="58506XXX"/>

But nothing works - any ideas how to fix this?

Plugin -


If you want to support android then you need to create a google develop account, create a new project for your app and set SENDER_ID=“your-project-number-from-google-developer-console”. Checkout the phonegap-plugin-push docs for more info


I already got an account but does Package process check that you got a valid SENDER_ID?



Have you tried to delete the plugin and add it again ?

ionic plugin rm phonegap-plugin-push --save
ionic plugin add phonegap-plugin-push --variable SENDER_ID=“XXXXXXX” --save


This was for sometime ago - i switched to regular builds for the moment havent checked for a while. But i would love to use “Package” in future…


If you’re using Ionic package I would try setting the SEND_ID in your config.xml.

Note: You need to specify the SENDER_ID variable in your config.xml if you plan on installing/restoring plugins using the prepare method. The prepare method will skip installing the plugin otherwise.


I have the same issue, I can build in xcode fine, but if I use ionic package, I always get
Error: Variable(s) missing (use: --variable SENDER_ID=value).

Despite having is set in the config.

<plugin name="phonegap-plugin-push" spec="~1.8.3">
    <variable name="SENDER_ID" value="868145353627"/>


You can also set the sender id via the command -

ionic config set gcm_key “Sender key here”



Got the same error.

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

I was reinstall plugin with variable, check config.xml and package.json
Any suggestions ?