<!--
{
  "availability" : [
    "macOS: 10.13.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLDeviceNotificationHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@T@MTLDeviceNotificationHandler"
  },
  "title" : "MTLDeviceNotificationHandler"
}
-->

# MTLDeviceNotificationHandler

A Swift closure or an Objective-C block that Metal calls
when the system adds or removes a GPU device.

```
typealias MTLDeviceNotificationHandler = @Sendable (any MTLDevice, MTLDeviceNotificationName) -> Void
```

## Parameters

`device`

An [`MTLDevice`](/documentation/Metal/MTLDevice) that represents the GPU that’s sending the notification.

`notifyName`

A notification that represents a change to a GPU device in the system.

## Discussion

---

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)