Problem with Local Notifications when using dismissNotificationAsync( localNotificationId ). Perhaps a bug?

Hi all!!

I’m using the following:

  1. SDK Version: 36
  2. Platforms(Android/iOS/web/all): iOS

When using Expo’s Local Notifications for iOS, I’m able to schedule future notifications using Notifications.scheduleLocalNotificationAsync(localNotification, schedulingOptions). However, I get an error when trying to cancel a scheduled notification using Notifications.cancelScheduledNotificationAsync(localNotificationId)

The error I’m getting is the following: “Error: Could not find pending notification request to cancel with ID.” Unfortunately, the ID’s I’m getting are in this format: 013A99D3-B3EB-4884-852D-6C9D409238D4.

According to Expo, a number must be passed to the localNotificationId parameter in Notifications.cancelScheduledNotificationAsync(localNotificationId). However, there is no way to cast that ID to a number because it contains dashes and letters.

Is there something I’m missing here? Are there other ways to cancel any notification that has been scheduled in the future? Because, it’s not such a good idea for a user to be able to trigger future notifications and then not be able to cancel them if they change their mind.

Thanks in advance for the help, and I would much appreciate any help!

Bumping this. Any one have any clue how to approach and navigate this?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.