我正在进行离子项目,并且确实实现了一个信号的通知服务。是否收到 Android和IOS 通知。
在android上一切正常,但 Rich附件在 IOS 中不起作用。没有收到“文字和标题”,但没有显示图片。
我所做的与文档中所述相同。 https://documentation.onesignal.com/docs/ionic-sdk-setup
我确实正确添加了 Notification Service Extension ,但似乎没有用。
以下是我的通知详细信息。
任何帮助将不胜感激。谢谢
来源:
private prepareOneSignalNotification() {
this.oneSignal.startInit('6ceb23d5-1d9f-4852-b0f6-XXXXX', '3139XXXXXXX');
this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.InAppAlert);
this.oneSignal.handleNotificationReceived().subscribe((data) => {
// do something when notification is received
console.log(data);
});
this.oneSignal.handleNotificationOpened().subscribe(() => {
// do something when a notification is opened
});
this.oneSignal.endInit();
}