openAsHidden
true
to open the app as hidden. Defaults to false
. The user can edit this setting from the System Preferences so app.getLoginItemSettings().wasOpenedAsHidden
should be checked when the app is opened to know the current value. This setting is not available on MAS build s or on macOS 13 and up.