Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
localNotification(notification) {
this.deviceNotification = {
body: notification.message,
alertAction: '',
userInfo: notification.userInfo,
};
NotificationsIOS.localNotification(this.deviceNotification);
}
function createiOSNotification(bird, index, date, alarm) {
NotificationsIOS.localNotification({
alertTitle: 'Dawn Chorus Alarm',
category: 'ALARM',
alertBody: `A ${bird.name} ${tweetyStrings[index]}!`,
alertAction: 'Tap to hear chorus.',
soundName: bird.sound.iosNotification,
fireDate: date.toDate().toISOString(),
userInfo: { alarmUUID: alarm.uuid },
}, alarm.uuid.toString());
return;
}
localNotificationSchedule(notification) {
if (notification.date) {
const deviceNotification = {
fireDate: notification.date.toISOString(),
body: notification.message,
alertAction: '',
userInfo: notification.userInfo,
};
NotificationsIOS.localNotification(deviceNotification);
}
}