Hi Costas,

I'd be interested in hearing the results of you following up NSXPCConnection.

When I read through the documentation about a year ago, it is focussed around 
providing a xpcservice which is a bundled executable within an application, and 
the application communicates with it using NSXPCConnection.

The NSXPCConnection can also be used for communicating with a LaunchAgent or a 
LaunchDaemon but I found the process of getting a LaunchAgent working as I 
found it difficult to separate what documentation was specific to an xpcservice 
and what was needed to be done differently for a LaunchAgent. I got there in 
the end, and I have the LaunchAgent side of things working and have a minimal 
project which demonstrates a working LaunchAgent. 
https://github.com/SheffieldKevin/LaunchAgent

The big BUT though is. I could never see how you could use NSXPCConnection to 
communicate between two applications. I would be interested to know how this 
can be done which is why I'd be interested in hearing the results of your 
examination of NSXPCConnection.

Kevin
 
On 30 Apr 2014, at 07:49, Costas Chatzinikolas <costas.chatziniko...@gmail.com> 
wrote:

> Thank you very much.
> 
> I had already solved the problem before yor response.
> It had to do with disabling sandboxing at all.
> 
> However i will follow your advice and start reading about NSXPCConnection.
> 
> One quick question: DO API is not available on iOS. Do you know if
> NSXPCConnection is?
> 
> 
> 2014-04-24 8:32 GMT+03:00 Charles Srstka <cocoa...@charlessoft.com>:
> 
>> On Mar 30, 2014, at 3:28 AM, Costas Chatzinikolas <
>> costas.chatziniko...@gmail.com> wrote:
>> 
>>> Hi everyone,
>>> 
>>> i recently made a set of 2 command lines apps in Cocoa, that use
>>> Distributed objects to communicate. In fact, the first app is the client
>>> that sends a message, the second app is the server the vends the object.
>>> Everything works ok!!!
>>> 
>>> Then i tried to make these 2 apps GUI based. I used the same code. The
>>> server vends the object, but the client is unable to get the connection.
>> It
>>> always gets a nil connection. In fact when i check the number of
>> available
>>> connections from the client using:
>>> 
>>> [NSConnection allConnections]
>>> 
>>> it always return zero connections. The only difference in my code is that
>>> in the GUI server app, i don't use:
>>> 
>>> [[NSRunLoop currentRunLoop] run]
>>> 
>>> since the GUI app has its own runLoop.
>>> 
>>> I also have enabled the sandbox networking capabilities for both GUI
>> apps.
>>> 
>>> Has anyone experience this behavior before me?
>>> 
>>> Thanks in advance...
>> 
>> Distributed Objects is pretty old and crusty at this point. You might want
>> to look into NSXPCConnection instead, which fixes a lot of problems that DO
>> had, and is likely to be better supported.
>> 
>> Charles
>> 
>> 
> _______________________________________________
> 
> 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/ktam%40yvs.eu.com
> 
> This email sent to k...@yvs.eu.com


_______________________________________________

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

Reply via email to