Open UberMC opened 9 months ago
I urgently suggest updating API so basic implementation works :) On page https://wix.github.io/react-native-notifications/docs/localNotifications
The fireDate requires it to be .toISOString(), new Date() is not sufficient
let currentTime = new Date(); let newTime = new Date(currentTime.getTime() + 10000); // Add 10 seconds let isoString = newTime.toISOString(); Notifications.postLocalNotification({ body: 'Local notification!', title: 'Local Notification Title', sound: 'chime.aiff', category: 'SOME_CATEGORY', link: 'localNotificationLink', fireDate: isoString }, 1);
The current example in API
let localNotification = Notifications.postLocalNotification({ body: "Local notification!", title: "Local Notification Title", sound: "chime.aiff", silent: false, category: "SOME_CATEGORY", userInfo: { }, fireDate: new Date(), });
results in react-native-error
fireDate doesn't seem to be available in the latest version of the library. Any idea what happened to it?
fireDate
I urgently suggest updating API so basic implementation works :) On page https://wix.github.io/react-native-notifications/docs/localNotifications
The fireDate requires it to be .toISOString(), new Date() is not sufficient
The current example in API
results in react-native-error