Clearing local notifications not working

I’m attempting to get local notifications working on iOS and having a heck of a time, any help would be appreciated.

I first call:
UnityEngine.iOS.NotificationServices.RegisterForNotifications(
UnityEngine.iOS.NotificationType.Alert |
UnityEngine.iOS.NotificationType.Sound);

Then:
UnityEngine.iOS.LocalNotification localNotification = new UnityEngine.iOS.LocalNotification();
localNotification.alertAction = notificationParams.Title;
localNotification.alertBody = notificationParams.Message;
localNotification.fireDate = DateTime.Now.AddSeconds(notificationParams.Delay.TotalSeconds);
localNotification.userInfo = new Dictionary<int, int>(1);
localNotification.userInfo.Add(notificationParams.Id, notificationParams.Id);
UnityEngine.iOS.NotificationServices.ScheduleLocalNotification(localNotification);

To try to clear the notification from the tray:
UnityEngine.iOS.NotificationServices.ClearLocalNotifications();

I’ve also tried:
loop id:
UnityEngine.iOS.NotificationServices.CancelLocalNotification(id)

I get the local notifications to fire, I just can’t clear them so they stay in the “Tray” or whatever it is called, any ideas?

TIA

When I call this the received array gets cleared.

Calling this function clears the notification from the iOS tray for you? Meaning the Home Screen on iOS, I’m not sure if it’s actually called the “Tray”.

I didn’t understand that’s what you meant.

No, the ‘tray’ is not cleared. But the app doesn’t seem to know about the notifications in the ‘tray’ as far as I can see. Once you touch a notification it is cleared from the ‘tray’ and then is added to the received array.

Gotcha, I guess they’ll just stay there until the user dismisses them. I wasn’t sure if this was normal behavior.

Thanks for the info!