I
transfer data between a safari extension app and MacOS app by using Distributed Notification Center. I use
DistributedNotificationCenter.default().addObserver
with a specific notification name and I post a notification from the MacOS App using the same name DistributedNotificationCenter.default().postNotificationName
I keep getting
attempt to post distributed notification 'nameofnotification' thwarted by sandboxing.
I saw in the apple documentation that
Sandboxed apps can send notifications only if they do not contain a dictionary. If the sending application is in an App Sandbox, userInfo must be nil.
My user Info is not nil, but this worked perfectly on previous versions of Mac. What am I missing ? Is this relatively new ?
What’s the alternative to communicate between extension and app? Would an XPC service work ?