показывает отправленное уведомление успешно, но не отображается - PullRequest
0 голосов
/ 17 октября 2018

apn для отправки уведомления сафари, в котором отображается отправленный массив с токеном устройства, но не отображается.

var apn = require("apn");
let options = {
cert: "./certificate.pem",
key: "./pushcert.pem",
production: true
};
let apnProvider = new apn.Provider(options);

var notification = new apn.Notification();

notification.expiry = Math.floor(Date.now() / 1000) + 3600  24  7;
//notification.body = "hello";
notification.badge=3;
notification.payload={"message":"ssss"}
// notification.title = title;
notification.alert="hi";
notification.topic = "";
notification.urlArgs = [];
apnProvider.send(notification,['xxxxxx','xxxx']).then( result => {
console.log(result);
});

apnProvider.shutdown();
...