Returns a CFRunLoopSource to be used to listen for notifications.
SDKs
- macOS 10.0+
- Mac Catalyst 13.0+
Framework
- IOKit
Declaration
func IONotificationPortGetRunLoopSource(_ notify: IONotification Port Ref!) -> Unmanaged<CFRun Loop Source>!
Parameters
notify
The notification object.
Return Value
A CFRunLoopSourceRef for the notification object.
Discussion
A notification object may deliver notifications to a CFRunLoop by adding the run loop source returned by this function to the run loop.
The caller should not release this CFRunLoopSource. Just call IONotification
to dispose of the IONotificationPortRef and the CFRunLoopSource when done.