A publisher that emits elements when broadcasting notifications.


struct Publisher


Declaring Publisher Topography

typealias NotificationCenter.Publisher.Output

The kind of values published by this publisher.

typealias NotificationCenter.Publisher.Failure

The kind of errors this publisher might publish.

Creating a Notification Publisher

init(center: NotificationCenter, name: Notification.Name, object: AnyObject?)

Creates a publisher that emits events when broadcasting notifications.

Inspecting Notification Center Properties

let center: NotificationCenter

The notification center this publisher uses as a source.

let name: Notification.Name

The name of notifications published by this publisher.

let object: AnyObject?

The object posting the named notfication.

Instance Methods


Conforms To

See Also

Publishing Notifications to Combine

func publisher(for: Notification.Name, object: AnyObject?) -> NotificationCenter.Publisher

Returns a publisher that emits events when broadcasting notifications.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software