Inter process communication

Hi,

How do I communicate between two apps on macOS. For example:- I There are 2 apps - App A and App B. App A wants to wait till App B complete an action.

How do I check whether App B completed an action or not? Which inter process communication is best for implementing it ?

Thanks

How do I communicate between two apps on macOS.

Are you deploying via the Mac App Store? Or independently using Developer ID signing?

Are both of these apps created by the same team?

What’s the nature of the communication? How frequent? And how large are the messages?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Not going to deploy via App Store. We will code sign and install it. Yes. same team owns both apps. we want to com
I need to communicate based on some state - true or false, not frequently. so messages are just state only
Well, on the one hand your answers make this very easy because there are so many ways to achieve this goal. On the other hand, having so many options makes it hard to choose.

Some more questions:
  • Is this IPC per user? Or global to the system? That is, if users A and B are simultaneously logged in and running apps X and Y, does user A’s instance of X need to see changes made by user B’s.

  • How do you want to handle the case where X is running and Y is not? Do you want X to leave the state in some persistent place where Y will see it on next launch? Or do you simply not care about this possibility?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
IPC per user only and not global to the system. In case if App A is not running it should launch and make it run.
how do i accomplish it?
There are still lots of ways to do this. Personally I tend to favour Apple events for this sort of thing, but you could just as easily use a UNIX domain socket in an App Group that the two apps share.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Inter process communication
 
 
Q