Best way to communicate with sandboxed helper app?

I’m using ServiceManagemtModuleMBS according Valdemar de Sousa’s example, for integrating a helper app with a sandboxed application.

I finally got that working and now I would like to integrate a two-way communication between main app and helper app. I guess this would be IPCSocket then with using a temporary folder, like:

Is this recommendable, or are there any better/safer ways to establish a communication within a sandboxed environment?

I think you may need to use XPCConnection (NSXPCConnectionMBS0.

Thanks Yoann, this sounds like the way to go. I’ll try.

How can I send messages back and forth from an application to its helper app, in a sandboxed app, in /Library/LoginItems, and started with ServiceManagementModuleMBS?

I tried to get the NSXPC MBS example working, but at no success. In the console log I find this:

[quote]26.05.15 18:03:39.125 Helper[1595]: Bogus event received by listener connection:
<error: 0xa0c9b7dc> { count = 1, contents =
“XPCErrorDescription” => <string: 0xa0c9b9c0> { length = 18, contents = “Connection invalid” }

As an alternative, I continued to try to make a IPC connection working, according to the example which ships with Xojo. Apparently App and helper use the same folderitem to establish a connection, but it fails in the helper:

Error 106 translates into : InvalidStateError

Whatever that means …

I need a hint on how to establish a communication between app and helper, in a sandbox. Has anybody done this and could help with a howto?