Or, can I set the callback of "Show All Windows" or "Hide" programmatically?
Update: I just found applicationWillHide/DidHide to set the callback of "Hide" item. But seems like I can not abort or abort its hide process unless I set the "canHide" window I don't want hide to false.
Post
Replies
Boosts
Views
Activity
It does have potential security threats that if the attacker knows our notification name, he/she could intercepted and mock our messages to maliciously command the main process to quit. I think all we need to do is encrypt the command string.
Hi @eskimo,
About Notification, I thought if the observer is register with a specific name string and the sender post the notification with that string, all other applications will not receive or respond to the notification, right?
Besides, the notification does not contain any data that have security risks. Actually there is no data to transmit, only simple events like click and quit. Under this condition, I think NSDistributedNotificationCenter will be neat and suitable candidate method consider the development cost.
I finally decide to go NSDistributedNotificationCenter way. Because in our scenarios, messages and applications do not have states. I actually made a demo to test its performance and resource cost. Found out it is quite reliable.
For anyone interested in the performance of NSDistributedNotificationCenter:
Forget to mention, all apps are non-sandboxed. I am seeking the most feasible and low cost means.
My solution: If you have flag "GCC_GENERATE_TEST_COVERAGE_FILES=YES" specified in xcodebuild arguments, remove it in XCode 13. It seems like this will extract coverage data out of "*.xcresult" files in xcode 13.
Tried the script above, it didn't work.