LSUIElement is a Mac OS X type of application that runs in the background (having no menu bar) but can also show windows and accept user input. Many such apps use a menu item ([NSStatusItem]) to let the user interact with the app.
Questions tagged [lsuielement]
8 questions
87
votes
7 answers
How to hide the Dock icon
I want to make a preference for hiding the Dock icon and showing an NSStatusItem.
I can create the StatusItem but I don't know how to remove the icon from Dock. :-/
Any ideas?

papr
- 4,717
- 5
- 30
- 38
7
votes
2 answers
LSUIElement not working
I have an application that has LSUIElement = 1 in the Info.plist. When I run the application, a dock item and toplevel menu bar is created for it. Why?
EDIT:
I was using a library that was calling TransformProcessType(), clobbering my Info.plist…

anthony
- 40,424
- 5
- 55
- 128
3
votes
2 answers
How can I make my app behave like I'm changing Application is agent(UIElement) at runtime using Swift?
I am coding a Mac app that is an NSPopover on the right side of the menu bar (Application is agent(UIElement) is set to YES). I allow the user to detach the popover by clicking and dragging it downward, which puts the app inside of a window. This…

TonyStark4ever
- 848
- 1
- 9
- 24
1
vote
1 answer
SwiftUI ColorPicker Fails In Background (Menubar) App
Context
I have an app that runs only from the macOS menubar. (The LSUIElement property in info.plist is set to YES).
Instead of a menu, this app shows an NSPopover when the menubar button is clicked. The popover holds an NSHostingView which has an…

Bryan
- 4,628
- 3
- 36
- 62
1
vote
0 answers
how can I handle the character palette hotkey in an LSUIElement application
I've implemented something like Cocoa Keyboard Shortcuts in Dialog without an Edit Menu for an LSUIElement application. In fact, to try to make sure I was not missing some obscure standard keybinding that I might forget to include, I just grabbed a…

Glyph
- 31,152
- 11
- 87
- 129
1
vote
2 answers
Transform LSUIElement to foreground application
I have an app which must run all the time (if the user agree whit this).
When the user quit the app, I transform the foreground app into a LSUIElement (the app only has a menu bar icon, the dock icon and the menu disappear).
I have an options in the…

usain
- 746
- 5
- 16
0
votes
1 answer
OS X - How to detect when app got launched in hidden state at Login?
My background app (LSUIElement mode) briefly shows a window at launch to let the user know that it has launched.
When the app gets launched as a Login item, some users choose to hide this startup window by checking the "Hide" option in the Login…

Thomas Tempelmann
- 11,045
- 8
- 74
- 149
0
votes
1 answer
Hidden Window Swift
Is there a way to make an application hidden from the user for an OS X application ( eg not being on the dock when it's open and only operating in the background). I know there is a way to make things like hidden Python windows but can I do it in…

brimstone
- 3,370
- 3
- 28
- 49