Current API design restricts notifications to only the ones that are provided in the Constants.swift.
And while notification names are generally standardised, applications are allowed to send notifications with custom names (with api like NSAccessibilityPostNotificationWithUserInfo)
This is what applications like Music, Safari and Dock do. It would be nice to change the API to allow for this use case. I was playing with a bunch fo design, to prototype how it would look like with generics or protocol, but C callbacks interoperability in swift with those features is not the best...
Current API design restricts notifications to only the ones that are provided in the
Constants.swift.And while notification names are generally standardised, applications are allowed to send notifications with custom names (with api like
NSAccessibilityPostNotificationWithUserInfo)This is what applications like
Music,SafariandDockdo. It would be nice to change the API to allow for this use case. I was playing with a bunch fo design, to prototype how it would look like with generics or protocol, but C callbacks interoperability in swift with those features is not the best...