Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift: Multiple local notifications but only show latest

I wanted to show a local notification at certain times of the day, and I should only be able to see (one) the latest notification in the notification center,

however my problem is:

(1) If i have set the local notifications to different identifiers, I get multiple notifications (which is expected, but not what I want)

(2) If i have one identifier and set it to all times, i get notified only on the last trigger time that i set, cause the other schedules were overridden

So, is it possible to get notified at specific times, and at the same time be able to see only the latest notification?

Thanks

like image 981
Vincent Bacalso Avatar asked Mar 05 '18 03:03

Vincent Bacalso


1 Answers

I don't think it is possible. Unique identifier is useful if you want to modify or delete specific notification at a later time. If you use the same identifier, only the latest scheduled notification will fire.

If you could do multiple notifications and only show the latest one, that could be abused to schedule multiple back-to-back notifications to schedule a long audio playback.

like image 148
Mikrasya Avatar answered Oct 20 '22 07:10

Mikrasya