Reputation: 522
I have a Chrome extension that I would like to communicate with my native Cocoa app. Im able to get data from the extension to a command line application using native messaging. I now need to get the info to the main Cocoa app. Im looking into NSXPCConnection, but from what I understand, xpc helper apps are spawned by the main app, but in this case, the Chrome extension spawns the helper. What is the best way to get this interapp communication working
Upvotes: 0
Views: 146
Reputation: 87
You should spawn a thread that continuously reads the standard input and then writes back on the standard out.
You can take a look at the python example in the chromium's source repository. Then you should find out how to do that in a Cocoa application.
Upvotes: 0