Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finder Sync extension: cannot communicate through UNIX domain socket

I have the following problem: I'm implementing the Finder Sync plugin, which needs to communicate with main application. Previously, when I used old good mach_inject, that worked fine via the UNIX domain socket. However, now, even allowed com.apple.security.temporary-exception.files.home-relative-path.read-write, and com.apple.security.network.client, I cannot connect to socket, always receiving 9/17/15 11:15:34.000 kernel[0]: Sandbox: finderplugin(660) deny network-outbound /Users/nickolay/Library/blablabla/.cmdsckt

Anybody has any ideas how to fix this? Maybe, other entitlements, or other socket path is needed?

like image 470
Nickolay Olshevsky Avatar asked Dec 07 '25 06:12

Nickolay Olshevsky


2 Answers

You need to add below contents in your extension's entitlements.

<key>com.apple.security.temporary-exception.sbpl</key>
<array>
    <string>(allow network-outbound)</string>
    <string>(allow network-bind)</string>
</array>
like image 126
Dass Avatar answered Dec 08 '25 19:12

Dass


Okay, NSXPCConnection doesn't seem to work, so I ended up in using mach ports. I.e. NSMachPort, NSMachBootstrapServer and so on.

like image 37
Nickolay Olshevsky Avatar answered Dec 08 '25 18:12

Nickolay Olshevsky