Not receiving local scheduled notifications on iOS

My Expo app schedules local notifications for event reminders. The notifications are scheduled and received perfectly on Android, but not iOS.

I’ve created a reduced test case based on the CRNA app:

Tapping the “Send Immediate Notification” button calls Notifications.presentLocalNotificationAsync() which IS then received by the callback.

Tapping the “Send Delayed Notification” button schedules a notification in 5 seconds with Notifications.scheduleLocalNotificationAsync() which IS NOT received by the callback.

I’m aware that notifications are not displayed by iOS if the app is in the foreground (PSA/Reminder: Notifications in iOS foregrounded apps), but I’m not receiving notifications at all in the Notifications.addListener() callback. Closing the app after scheduling a notification also has no effect.

I’m fairly certain the Permissions.REMOTE_NOTIFICATIONS check is not required for local notifications (it certainly isn’t on Android), but I’ve included it to be sure.

Please help!

I also face the same problem. It works in Android.

Hi. Thanks for the bug report and the repro.

I just cloned your example and noticed that you didn’t add a listener at all for Notification.addListener while you had one defined (_handleNotification). I added a listener and tried it both locally and on Snack. The listener is getting called in both cases.

Here is the code I ran -

Let me know if you are still facing the issue with this code?

1 Like

Thanks @satya164 for the response. In my case, the problem was with Permissions. I didn’t had the code for Permissions.askAsync(Permissions.NOTIFICATIONS). Once I added that it started working in iOS.

Thanks, that was indeed the issue with that test case. I reduced it too much!

The issue in my real app was the limit of 64 local notifications in iOS, I was scheduling more than that and not receiving them all, a gotcha for new iOS developers like me.

@mattstone and @leenasn

I have been struggling with local notifications for over 3 months. Wondering if you could take a look at how to use "export interface CalendarNotificationTrigger"

I just made a fresh push to the github repo here:

my code is on the Screens > HomeScreen page.