我正在尝试现在安排我的通知(尝试它是否正常工作)
所有内容都被弃用,所以我使用addNotificationRequest方法。我没有错误,也没有发生任何事情。我也打开了我的poermission,在xcode上我用后台模式和通知设置了我的应用程序。
还有我在登录页面上组件上的代码:
componentDidMount () {
const date=(new Date())
PushNotificationIOS.addNotificationRequest( NotificationRequest = {
id:'0',
title:'coucou',
body:"c'est moi !",
fireDate:date,
}
);
this.RequestUserPermission();
}我是不是忘了什么?
发布于 2021-08-30 12:10:34
在指定的起火日期将notificationRequest发送到通知中心。如果未设置firedate,则立即激发。
https://stackoverflow.com/questions/67006397
复制相似问题