Communicating with other processes from Safari Native App of Web Extension

I am creating a Safari Web Extension to add some security features to Safari browser. Web Extension has 2 parts, 1st - script code, which loads in browser and 2nd - a separate application/process called Native App which gets notifications and data of browser activities. I am able to get notifications of various browser activities in Safari Native App. When such notification is received, this needs to be sent to other daemon process running on same MacOS machine over unix domain socket (used for local IPC). This Safari Native App is running within a sandbox.

The issue is, when trying to connect to already listening socket of other process from Safari Native App, the sandbox of Native App denies outbound socket network connection. Question: Is there a way to communicate from sandboxed Native App using socket with other processes.

Disclaimers:

  1. Sandbox cannot be disabled, if disabled it stops getting notifications from Safari for activities, which is its basic work.

  2. Entitlements and app groups addition can be done, but the process to which it has to communicate cannot be added to app group.

Please help/suggest what can be way out from this problem.

Replies

It depends on the the communication you are trying to perform between the two processes.

https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/ExtensionOverview.html

has some possible solutions that can work.

Without more specifics, it's hard to know exactly the best way forward.