Recent

Author Topic: How to get rid of the dock icon  (Read 2845 times)

geraldholdsworth

  • Jr. Member
  • **
  • Posts: 98
How to get rid of the dock icon
« on: December 04, 2021, 10:57:48 am »
I've got an application which puts itself onto the menu bar, but it also leaves an icon on the dock. This all works fine under Windows, but not macOS.
I've found LSUIElements, which should be set in the info.plist file in the package, but I'd like to be able to do it programmatically.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1789
  • Former Delphi 1-7, 10.2 user
Re: How to get rid of the dock icon
« Reply #1 on: December 04, 2021, 11:40:06 am »
See Hiding a macOS application from the Dock. I think you may be disappointed.
Lazarus 2.3, FPC 3.3.1 macOS 12.1 x86_64 Xcode 13.2
Lazarus 2.3, FPC 3.3.1 macOS 12.1 aarch64 Xcode 13.2
Lazarus 2.3, FPC 3.2.2 FreeBSD 13.0 amd64 VM
Lazarus 2.3, FPC 3.2.2 FreeBSD 12.2 amd64 VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 VM
Lazarus 2.0.10 FPC 3.2.0 Win10 amd64 VM

geraldholdsworth

  • Jr. Member
  • **
  • Posts: 98
Re: How to get rid of the dock icon
« Reply #2 on: December 05, 2021, 09:39:54 am »
I am...I'd already come across that page.
I'd also come across this page, but it is in C (or Swift):
https://stackoverflow.com/questions/620841/how-to-hide-the-dock-icon/68057340#68057340
and:
https://stackoverflow.com/questions/5382932/how-to-create-a-helper-application-lsuielement-that-also-has-a-removable-doc
Not sure how to achieve the same result in Lazarus.

 

TinyPortal © 2005-2018