Search code examples
swiftmacossystem

macOS notify_keys.h constant in Swift


How do I use the constant of /usr/include/notify_keys.h in Swift code? Which documentation should I refer to for the key beside of the actual header file?

I am using CFNotification​Center​


Solution

  • You'd need to add a bridging header file to your project and import the notif_keys.h file in the bridging header file. If you need additional information on how to do this, please ask and I'll expand upon the answer.