ionic3 iOS12监听收到消息jpush.receiveNotification需要点击才收的到

SamyGit
2019-08-19 01:17 116 0

// 收到通知时会触发该事件
document.addEventListener('jpush.receiveNotification', event => {
const content = this.platform.is('mobile') && !this.platform.is('mobileweb') && (this.platform.is('ios') || this.platform.is('ipad') || this.platform.is('iphone')) ? event['aps'].alert : event['alert'];
console.log('jpush.receiveNotification' + content);
console.log("收到通知" + JSON.stringify(event));
}, false);

iOS12 上面监听收到通知的方法要点击通知才触发,用的 jpush-phonegap-plugin^3.3.2版本, @jiguang-ionic/jpush^1.0.2版本,

1个回答

热门排序
  • 你是如何测试的,iOS手机处于前台还是后台,发消息的时候有没有设置 content -available