【问题标题】:How to see my notification with react-native-push-notification-ios / push-notification-ios如何使用 react-native-push-notification-ios / push-notification-ios 查看我的通知
【发布时间】:2021-07-04 11:10:33
【问题描述】:

我现在正在尝试安排我的通知(试试它是否有效)

一切都已弃用,所以我使用 addNotificationRequest 方法。我没有错误,也没有发生任何事情。我也有我的poermission,在xcode上我用后台模式和通知设置我的应用程序。

还有我在登录页面上的 componentdidmont 上的代码:

componentDidMount () {
    
   const date=(new Date())
    PushNotificationIOS.addNotificationRequest(  NotificationRequest = {
     
      id:'0',
      title:'coucou',
        body:"c'est moi !",
        fireDate:date,
    }
    );
   this.RequestUserPermission();
  }

我是不是忘记了什么?

【问题讨论】:

    标签: ios react-native push-notification


    【解决方案1】:

    在指定的触发日期向通知中心发送通知请求。如果没有设置 firedate,则立即触发。

    【讨论】:

    • 请添加更多详细信息以扩展您的答案,例如工作代码或文档引用。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-12-29
    • 1970-01-01
    • 1970-01-01
    • 2018-02-05
    • 1970-01-01
    • 2019-05-16
    • 1970-01-01
    相关资源
    最近更新 更多