• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Talking to other apps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Talking to other apps


  • Subject: Re: Talking to other apps
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 04 Aug 2014 10:56:42 -0700

> On Aug 4, 2014, at 10:41 AM, Scott Ribe <email@hidden> wrote:
>
> Showing my age here, but as an old UNIX troll, and assuming the apps are not sandboxed, I'd just use domain sockets.
>
> <https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man4/unix.4.html>

I have done this, and it’s surprisingly painful. I’d never do it again.

_Using_ the sockets is pretty easy (assuming you enjoy implementing framing protocols). The hard part is that you have to have a pseudo-file, located in the filesystem, to represent a Unix-domain socket. So you have to find a hidden place to create this ‘file’ with a randomly-chosen name (unless you don’t care about DoS attacks), give it the proper permissions, somehow transmit knowledge of that location to the other app, and clean it up when you’re done.

Doing this instead of using XPC or AppleEvents is like carving your own wheel out of stone instead of just going to a store and buying one.

—Jens
_______________________________________________

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


References: 
 >Talking to other apps (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Talking to other apps (From: Kevin Meaney <email@hidden>)
 >Re: Talking to other apps (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Talking to other apps (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: Talking to other apps
  • Next by Date: Re: Talking to other apps
  • Previous by thread: Re: Talking to other apps
  • Next by thread: Re: Talking to other apps
  • Index(es):
    • Date
    • Thread