I am using NSDistributedNotifications as an IPC on macOS between two processes. Sometimes I see that the notification is sent but is not received and the desired operation is not executed.
Sender Code:
[[NSDistributedNotificationCenter defaultCenter]postNotificationName:@"doSomething" object:myObject userInfo:config deliverImmediately:YES];
Receiver's code:
[[NSDistributedNotificationCenter defaultCenter]addObserver:self selector:@selector(myfunc:) name:@"doSomething" object:myObject];
Is there a way to debug this? Can I run some command line utility like dtrace or so to see if the notification was even sent to the desired process? Any help will be appreciable