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

# pushHandler(_:)

Register a type that can handle push tokens changing for widgets.

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

## Parameters

`pushHandlerType`

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

## Overview

Use this to opt this widget into supporting updates via push notifications.

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

When the push configuration of your widgets changes, each unique handler type
will be instantiated and <doc://com.apple.documentation/documentation/WidgetKit/WidgetPushHandler/pushTokenDidChange(_:widgets:)>
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)