You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.
Interact with NSDistributedNotificationCenter
There are many notifications posted by parts of OS X, and third party apps, which may be interesting to react to using this module.
You can discover the notifications that are being posted on your system with some code like this:
Note that distributed notifications are expensive - they involve lots of IPC. Also note that they are not guaranteed to be delivered, particularly if the system is very busy.
API Overview
Functions - API calls offered directly by the extension
Creates a new NSDistributedNotificationCenter watcher
Parameters
callback - A function to be called when a matching notification arrives. The function should accept one argument:
notificationName - A string containing the name of the notification
name - An optional string containing the name of notifications to watch for. A value of nil will cause all notifications to be watched on macOS versions earlier than Catalina. Defaults to nil.
object - An optional string containing the name of sending objects to watch for. A value of nil will cause all sending objects to be watched. Defaults to nil.