On 7/25/23 7:38 AM, Rob Petrovec via Cocoa-dev wrote:
NSDistributedNotificationCenter is a way to send a notification out across the
system. Only processes that are listening for the notification will receive it and
have a chance to do something with it. It’s like yelling out in a crowded room to
tell a single person something. Everyone will hear your message, but only one will
be listening. Make sense?
https://developer.apple.com/documentation/foundation/nsdistributednotificationcenter?changes=_4&language=objc
But what it really sounds like you want to use XPC (Cross Process
Communication) for a more targeted messaging (possibly with payloads) between
your app and menuling.
https://developer.apple.com/documentation/xpc?language=objc
An XPC service isn't an app, and wouldn't you need an app to run an
NSStatusItem, which I assume is what's meant by a "menu bar item"?
See <https://developer.apple.com/forums/thread/715338> for a discussion
of XPC versus some other methods of communication.
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com