mirror of
https://github.com/munki/munki.git
synced 2026-05-08 13:29:29 -05:00
When posting a new Notification Center notification, make sure any previous notifications are removed
This commit is contained in:
@@ -199,6 +199,7 @@ long const DefaultUseNotificationCenterDays = 3;
|
||||
center.delegate = self;
|
||||
// First remove earlier notifications from us
|
||||
[center removeAllPendingNotificationRequests];
|
||||
[center removeAllDeliveredNotifications];
|
||||
// request authorization
|
||||
[center requestAuthorizationWithOptions:(UNAuthorizationOptionProvisional + UNAuthorizationOptionAlert)
|
||||
completionHandler:^(BOOL granted, NSError * _Nullable error) {
|
||||
|
||||
Reference in New Issue
Block a user