I have an application which will launches another application as a child process.
The child application does not need the dock icon, we use [NSApp setActivationPolicy: NSApplicationActivationPolicyAccessory];
to achieve it.
However, I have discovered that the dock icon cannot be perfectly hidden.
-
The number of recently used apps that aren’t already in dock(not choose keep in dock) less than three: The icon of the child application remains in the dock without being hidden.
-
The number of recently used apps that aren’t already in dock(not choose keep in dock) more than three: The icon of the child application appears a few milliseconds.
Even though add LSUIElement key in the Info.plist can work, we are seeking a programmatic modification.