在我的应用程序中,有时不会触发本地通知。没有特定情况。有时会触发但有时不会。
我看到所有通知都已正确设置(计划),但它不会触发通知。
设备:iPhone 6 - iOS 10.3.3 iPhone 6 - iOS 11.1.2
LocalNotifService.scheduleNotif(date,"message",mp3NameOntime);
我的通知服务:
static scheduleNotif(date,message,sound) {
PushNotification.localNotificationSchedule({
date: date,
/* Android Only Properties */
ticker: "Notification Ticker",
autoCancel: true,
largeIcon: "ic_launcher",
smallIcon: "ic_notification",
color: "#251278",
tag: 'Notification Tag',
group: "group",
ongoing: false,
visibility: "public",
/* iOS only properties */
alertAction: 'view',
number: "0",
/* iOS and Android properties */
title: "Title"
message: message,
playSound: true,
soundName: sound,
});
}
取消:
static cancelAll() {
PushNotification.cancelAllLocalNotifications();
}