Is it possible to hide the icon in Dock Bar under OS X?No, it's an OS X limit (or bug).
Under OS X, every application has an icon in dock bar.
Only "agents" don't have an icon.
If a system is requesting shutdown, AirVPN client needs to restore settings (for example Network Lock) before the shutdown occurs.
OS X waits for the cleanup of an application only if it is a foreground application.
OS X kills directly any "agent", without waiting for the cleanup.
Apple Tech Support says the requested behavior is not possible.
The application designed as an Agent (for instance by setting LSUIElement to YES) is not allowed to interrupt shutdown or logout sequence.
System simply doesn't wait for response and doesn't bother to read and respect return value.
Background application (that does not have Dock icon and Menu bar) is not allowed to interact with user nor cancel its shutdown sequence.
Apple Tech Support says that there is no possibility to hide Dock icon and Menu bar and be foreground application.
Same issue described here: