Re: Talking to other apps
Re: Talking to other apps
- Subject: Re: Talking to other apps
- From: Roland King <email@hidden>
- Date: Tue, 05 Aug 2014 08:07:28 +0800
> On 4 Aug 2014, at 2:54 pm, Gerriet M. Denkmann <email@hidden> wrote:
>
> My app wants to talk to some app-friend. Like sending a string and getting another string back. Or something slightly more complicated.
>
> In the good old days I would have used Distributed Objects, but this seems to be no longer the fashion. Xcode 6 does not provide any documentation about this (or I can't find it).
>
> So, what to do?
> NSPerformService (which also has the feel of not being well-loved), XPC, or what else?
>
> Gerriet.
It’s odd how it’s easier to get two public apps to talk to each other than it is to get two private ones to.
I’d put them in the same app group (presuming they are sandboxed) and then either use a domain socket or set up a simple dropbox in the shared directory and use a long-running NSFilePresenter to listen for changes and NSFileCoordination to read/write files to it. I’ve used that rather simple method in a few places now and it’s been surprisingly successful. You just end up with a callback on a queue of your choice in your app, read the file and go on your way.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden