Node.js server using Ionic Push REST API to send push notifications on iOS and Android.
- Node.js
- Ionic App that is setup for push notifications
var ionicPushServer = require('ionic-push-server');
var credentials = {
IonicApplicationID : "myID",
IonicApplicationAPItoken : "myIonicAPItoken"
};
var notification = {
"tokens": ["your", "device", "tokens"],
"profile": "my-security-profile",
"notification": {
"title": "Hi",
"message": "Hello world!",
"android": {
"title": "Hey",
"message": "Hello Android!"
},
"ios": {
"title": "Howdy",
"message": "Hello iOS!"
}
};
ionicPushServer(credentials, notification);
Problems? Join the discussion on or file an issue. Thanks!