React Native-有时在IOS中不触发本地推送通知

时间:2018-12-26 11:53:50

标签: ios iphone react-native notifications react-native-push-notification

在我的应用中,本地通知有时不会触发。没有具体情况。有时会触发,但有时不会触发。

我看到所有通知均已正确设置(安排),但不会触发通知。

设备: 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();
  }

0 个答案:

没有答案