Push Notification is not working when i build the application when i use the command ionic package build android --profile Profile
and when i use ionic build android
it work for me, but Why? i need to work with ionic package
not with ionic build
Asked
Active
Viewed 200 times
0

Rafael RN
- 176
- 1
- 8
1 Answers
0
This worked for me - see the bottom of this URL: https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PHONEGAP_BUILD.md
Users have reported issues with Ionic Cloud Build. Apparently there are some differences in the way variables are handled. If your app has an issue where the PushNotification object can't be found try the following.
Remove the inclusion of phonegap-plugin-push from config.xml. That is delete lines that look like this:
<plugin name="phonegap-plugin-push" spec="~1.9.1">
<variable name="SENDER_ID" value="xxx"/>
</plugin>
Add the following lines into package.json in the cordovaPlugins array.
{
"variables": {
"SENDER_ID": "xxx"
},
"locator": "phonegap-plugin-push"
}

Rodney
- 5,417
- 7
- 54
- 98
-
Well, I can't test now, but as soon as I test I'll answer you – Rafael RN May 08 '17 at 20:01