Recent

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

geraldholdsworth

  • Full Member
  • ***
  • Posts: 125
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: 1983
  • 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.3.1 x86_64 Xcode 13.4
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 aarch64 Xcode 13.4

geraldholdsworth

  • Full Member
  • ***
  • Posts: 125
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