---
title: "init(center:name:object:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/notificationcenter/publisher/init(center:name:object:)"
---

# init(center:name:object:)

Creates a publisher that emits events when broadcasting notifications.

## Declaration

```swift
init(center: NotificationCenter, name: Notification.Name, object: AnyObject? = nil)
```

## Parameters

- `center`: The notification center to publish notifications for.
- `name`: The name of the notification to publish.
- `object`: The object posting the named notfication. If nil, the publisher emits elements for any object producing a notification with the given name.
