OnlySwitch icon indicating copy to clipboard operation
OnlySwitch copied to clipboard

App icon is visible on the dock, no option to hide it

Open alfianridwan opened this issue 1 year ago • 2 comments

Describe the bug OnlySwitch app icon is visible on the dock.

To Reproduce N.A.

Expected behavior OnlySwitch app icons should not be on the dock.

Desktop (please complete the following information):

  • OS: Sequioa 15.0
  • Version 2.5.4

Additional context

  • Try and removing and reinstalling
  • Tried shut down and restart

alfianridwan avatar Oct 11 '24 02:10 alfianridwan

Screenshot 2024-10-13 at 12 07 01 PM Having the same issue, especially after a restart.

Have to quit and start the app again to remove the icon from the dock.

binaryblitz10 avatar Oct 13 '24 06:10 binaryblitz10

I'm facing the same issue, especially after a restart. In order to remove it from the dock, I quit and open the app again. This behavior has started since the latest update - V2.5.4.

FrancisMorelli avatar Oct 17 '24 10:10 FrancisMorelli

I found a way to fix this.

  1. Find the app on your Finder.
  2. Right click and "Show Package Contents"
  3. Find Info.plist
  4. Open it (backup the file in case anytg goes wrong)
  5. Find <key>LSUIElement</key>
  6. On the next line, change <false/> to <true/>
  7. Save the file
  8. Quit Only Switch
  9. Re-open it and the icon should not be in the dock

@jacklandrin not sure where to edit this in the project file as I'm not a MacOS dev so I cant make a PR, but hope you can update this!

alfianridwan avatar Nov 02 '24 12:11 alfianridwan

@alfianridwan Thanks for your solution. However, the requirement is that the app icon will display in the dock only when settings is open. If setting LSUIElement to true, it will cause app icon always is hidden. So far I am using NSApp.setActivationPolicy() to control if show the icon on dock. Somehow, there are some problems with it in the new macOS version when app launches.

jacklandrin avatar Nov 03 '24 10:11 jacklandrin

@alfianridwan @binaryblitz10 @FrancisMorelli After investigating, seems it's a system bug from Apple. I found some developers also facing same issue. https://github.com/buresdv/Cork/issues/408 I'll engage the same workaround to fix it in the next version.

jacklandrin avatar Nov 03 '24 10:11 jacklandrin

@alfianridwan fixed in the version 2.5.5

jacklandrin avatar Nov 03 '24 15:11 jacklandrin