<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NotificationQueue/dequeueNotifications(matching:coalesceMask:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSNotificationQueue(im)dequeueNotificationsMatching:coalesceMask:"
  },
  "title" : "dequeueNotifications(matching:coalesceMask:)"
}
-->

# dequeueNotifications(matching:coalesceMask:)

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

```
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 [`none`](/documentation/Foundation/NotificationQueue/NotificationCoalescing/none), [`onName`](/documentation/Foundation/NotificationQueue/NotificationCoalescing/onName), and [`onSender`](/documentation/Foundation/NotificationQueue/NotificationCoalescing/onSender).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)