---
title: "dequeueNotifications(matching:coalesceMask:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/notificationqueue/dequeuenotifications(matching:coalescemask:)"
---

# dequeueNotifications(matching:coalesceMask:)

Removes all notifications from the queue that match a provided notification using provided matching criteria.

## Declaration

```swift
func dequeueNotifications(matching notification: Notification, coalesceMask: Int)
```

## Parameters

- `notification`: The notification used for matching notifications to remove from the notification queue.
- `coalesceMask`: A mask indicating what criteria to use when matching attributes of notification to attributes of notifications in the queue. The mask is created by combining any of the constants doc://com.apple.foundation/documentation/Foundation/NotificationQueue/NotificationCoalescing/none, doc://com.apple.foundation/documentation/Foundation/NotificationQueue/NotificationCoalescing/onName, and doc://com.apple.foundation/documentation/Foundation/NotificationQueue/NotificationCoalescing/onSender.

## See Also

### Managing Notifications

- [enqueue(_:postingStyle:coalesceMask:forModes:)](foundation/notificationqueue/enqueue(_:postingstyle:coalescemask:formodes:).md)
- [enqueue(_:postingStyle:)](foundation/notificationqueue/enqueue(_:postingstyle:).md)
