Posts a notification for an object.


func CFNotificationCenterPostNotification(_ center: CFNotificationCenter!, _ name: CFNotificationName!, _ object: UnsafeRawPointer!, _ userInfo: CFDictionary!, _ deliverImmediately: Bool)



The notification center to post the notification.


The name of the notification to post. This value must not be NULL.


The object posting the notification. If NULL, the notification is sent only to observers that are observing all objects. In other words, only observers that registered for the notification with a NULL value for object will receive the notification.

If you want to allow your clients to register for notifications using Cocoa APIs (see NotificationCenter), then object must be a Core Foundation or Cocoa object.

For distributed notifications, object must be a CFString object.

If center is a Darwin notification center, this value is ignored.


A dictionary passed to observers. You populate this dictionary with additional information describing the notification. For distributed notifications, the dictionary must contain only property list objects. This value may be NULL.

If center is a Darwin notification center, this value is ignored.


If true, the notification is delivered to all observers immediately, even if some observers are in suspended (background) applications and they requested different suspension behavior when registering for the notification. If false, each observer’s requested suspension behavior is respected.

If center is a Darwin notification center, this value is ignored.

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