macOS设置不在Dock上显示App图标

在Info.Plist里设置:
LSUIElement是以Agent的方法启动。不在Dock上显示图标,但会显示窗口。
LSBackgroundOnly变成后台进程,不在Dock上显示图标,也不会显示窗口。

TransformProcessType
[NSApp setActivationPolicy: NSApplicationActivationPolicyAccessory];
以上两个没有研究。

Reference:

  1. https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/20001431-113253
  2. http://stackoverflow.com/questions/6796028/start-a-gui-process-in-mac-os-x-without-dock-icon/9220840
  3. http://stackoverflow.com/questions/620841/how-to-hide-the-dock-icon