Please provide the following:
- SDK Version: 38
- Platforms(Android/iOS/web/all): iOS
I just upgraded to Expo SDK 38 and everything works great. I’m trying to migrate to the new Notifications API; however, I’m running into some problems.
With the Legacy API, I’m able to trigger local notifications using the scheduleLocalNotificationAsync()
, perfectly. However, when using scheduleNotificationAsync()
, the promise provides a string in the response, but no notifications are being triggered in the future. I’m following the exact example from the docs, but here’s my code:
Notifications.scheduleNotificationAsync({
title: this.state.firstName + ", you have an upcoming activity!",
body:
this.state.event +
" will be meeting this " +
this.state.startTime +
" at " +
this.state.startDate +
".",
ios: {
sound: true,
_displayInForeground: true,
},
trigger: {
seconds:
moment(this.props.navigation.getParam("activity").startDate)
.parseZone()
.local()
.subtract(3, "days")
.diff(new Date().getTime(), "seconds"),
},
is there something that I’m doing wrong or does anyone know if this is a bug in the new Notifications API?