Post

Replies

Boosts

Views

Activity

Reply to LocalNotifications not working properly
I think what’s happening here is that you are using the same requestIdentifier for each UNNotificationRequest created in your function. Regardless of what date you pass in, you will be replacing any previously scheduled notification on that device with a new notification each time. See Apple’s documentation:  “If you use the same identifier when scheduling a new notification, the system removes the previously scheduled notification with that identifier and replaces it with the new one.” https://developer.apple.com/documentation/usernotifications/unnotificationrequest/1649634-identifier You could use the notificationID value you generated earlier in the function like this: let request = UNNotificationRequest(identifier: notificationID, content: content, trigger: trigger) However,  if you want to give users the functionality to update/replace or cancel a previously scheduled notification, you should generate this notificationID outside your function and store it somewhere. To cancel a notification,  use the removePendingNotificationRequestsWithIdentifiers function call.  Hope this helps,bvsdev
Sep ’20