Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way that a Silverlight out-of-browser app can communicate with another app (for example an Objective-C app) installed on a Mac?

Any help or suggestion will be highly appreciated.

share|improve this question
That would be a security nightmare of the first magnitude. A Mac OS Desktop App, however, can talk to a web site that's hosting this silverlight app. What are you hoping to accomplish? What do you want to do? Why does this seem like a good idea? – S.Lott Jul 19 '11 at 2:20
I'm looking for a solution/workaround for the missing p/invoke feature of Silverlight on the Mac. – Mike Jul 19 '11 at 2:36
See…. Asked and answered. – S.Lott Jul 19 '11 at 9:51
@S.Lott Thanks for the link but in my view it is not exactly the same question (see my comment below) and it is not yet answered. – Mike Jul 19 '11 at 12:13
up vote 1 down vote accepted

If what you mean by "a Silverlight out-of-browser app" and "another app (for example an Objective-C app) installed on a Mac" are simply two processes, and you're looking for an interprocess communication mechanism, there are several possibilities.

Since Silverlight has both a networking (sockets) API and a filesystem API, those should both be good options. I'd probably use TCP/IP networking, which I'd expect to be pretty fast when both processes are on the same machine.

share|improve this answer
Thanks for your answer and yes: Some kind of an interprocess communication mechanism is what I mean. As I understand, Silverlight on a Mac can only connect to sockets but not open it. So the solution would be to write an Objective-C app which opens a socket and the SL app could then connect to it. Would this be possible? – Mike Jul 19 '11 at 12:08
I can't speak in detail to the SL side, but an ObjC app can certainly use the C-based sockets API to do anything possible with a TCP/IP connection, and can probably use the Cocoa NSStream class to do it too. – Bob Murphy Jul 19 '11 at 14:45
ok, thanks, so the solution in my case would be: build an ObjC app which opens a socket, starts the SL app and then runs hidden in the background. The SL app can then connect to the ObjC using sockets :-) – Mike Jul 19 '11 at 15:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.