When the user clicks on the dock icon using the right mouse button (or using the command button + mouse click) in the running application - he can see the Dock menu. This usually consists of 3 parts:

a list of all open documents of this application (red), the user part of the application (yellow) and default elements that are implicitly added to all elements (blue).
Here apple explains that we can define these custom elements (yellow) by implementing the application delegation method ‑(NSMenu *)applicationDockMenu:(NSApplication *)sender , which should return (or by defining this Dock menu in the Builder interface).
If you try to open the dock menu for Finder, you will see an unusual menu:

This is unusual because it does not have the usual items to exit and the "Options" submenu, like any other running application by default. Instead, it has only "Hide."
I am sure that the application or the nib file can override this standard "system" (blue) part of the Dock menu. Maybe someone knows how this can be achieved?
I am developing a security application that should not be allowed to log out or choose to run "at logon", but it should be executed all the time when the user is logged in (just like Finder, it can only be stopped using the Force control application exit or activity). I have good reasons to get rid of him. I know that this is not entirely Mac OS, but it is not a very normal application. Has anyone done something like this?
thanks
source share