iOS
iOS copied to clipboard
Mac App opens a window at Login even if it is only shown in the Menu Bar (non-standard behaviours)
Model Name: macOS Version: Various devices, Intel 16" MacBook Pro, M1 iMac, M1 MacBook Pro App Version: 2021.266 Safari Version: Latest with current macOS Monterey
Describe the bug When the checkbox in Home Assistant to "Launch App on Login" is selected, and the "Show App In..." is set to "Menu Bar", a window still opens. This is not standard behaviour with macOS menu bar applications.
To Reproduce Check the checkbox for "Launch App on Login", set "Show App In..." to "Menu Bar". Restart.
Expected behavior At login no window is opened.
There is a workaround, as per my issue for the docs, but that's not intuitive.
From the linked issue, it sounds like the fix for this bug is to support adding the companion to Login Items when the "Launch App on Login" is checked and remove it when unchecked. Is that correct?
Accordingly, the app should only present if either "Dock" or "Dock & Menu Bar" are selected - at login or immediately upon selection. I'm interested in working on this.
I don't believe that Login Items is app-writeable in the sandbox era. However, it would be possible to modify the Launcher app (which is the separate app launched on login) to launch the app and hide it at the same time based on some preference.
Please note that the Login Items workaround does not completely work. I think the solution is probably to modify the Launcher app.
See my comment on the workaround.