<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ControlWidgetConfiguration/pushHandler(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI26ControlWidgetConfigurationP0D3KitE11pushHandleryQrAD0c4PushH0_pXpF"
  },
  "title" : "pushHandler(_:)"
}
-->

# pushHandler(_:)

Register a type that can handle push tokens changing for controls of this type.

```
@MainActor @preconcurrency func pushHandler(_ pushHandlerType: any ControlPushHandler.Type) -> some ControlWidgetConfiguration
```

## Parameters

`pushHandlerType`

The type of the object that can handle push tokens you use to update the control with push notifications.

## Overview

Use this to opt your control into using push notifications.

If you have multiple control types, you can choose to use the same push
handler type for those control types.

When the push configuration of your controls changes, each handler type will be instantiated and
<doc://com.apple.documentation/documentation/WidgetKit/ControlPushHandler/pushTokensDidChange(controls:)> will be called.

---

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)