0

Possible Duplicate:
Best way to do interprocess communication on Mac OS X

Is there any way that I could share information between two separate applications on OSX?

Here is what I am aiming to achieve:

  • Develop an add-on for a program, which will be coded in pure C.
  • Develop a stand-alone application (cocoa obj-c) that will communicate with my add-on.

My application would be where I implement my custom data model and user interface, what I then want to do is share data to the add-on for me to work with - essentially setting up a parasite program that will use the other program for some things, and my program for others.

Sorry if that is a little vague, all I really want to know is: would this be possible, should I do this (is it a programming no-go?), and what kind of way would be the right way to go about this if it is possible?

I would like to be able to both send and retrieve data to and from my stand alone application in real time.

Community
  • 1
  • 1
tom1990
  • 602
  • 8
  • 17
  • 1
    Have also a look at [XPC Services](http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingXPCServices.html) which is a (relatively new) mechanism for basic interprocess communication, especially made for privilege separation and stability. – Martin R Dec 08 '12 at 20:06
  • @MartinR: Are XPC Services allowed to show UI? – Peter Hosey Dec 08 '12 at 21:04
  • What I saw at some WWDC was a main Cocoa program (with UI) and a service without UI, so I am not sure. There is a sample program [Sandboxing with NSXPCConnection](http://developer.apple.com/library/mac/#samplecode/SandboxingAndNSXPCConnection/Introduction/Intro.html#//apple_ref/doc/uid/DTS40012665-Intro-DontLinkElementID_2), perhaps that can be used as a starting point. – Martin R Dec 08 '12 at 21:15
  • This XPC Services feature is looking pretty interesting indeed! I have been having a look through the Apple Developer Documentation, and from the sound of it, this may be a good way of doing what I would like to do. It looks like quite an advanced topic to digest though so I guess it will take some getting used to. My only worry would be compatibility, initial reading (albeit pretty surface at this stage) seems to indicate it may limited to 10.7+ – tom1990 Dec 08 '12 at 22:18

0 Answers0