buresdv / Cork

A fast GUI for Homebrew written in SwiftUI
https://corkmac.app
2.33k stars 131 forks source link

Menu Bar Bug: No Icon in macOS 15.0 #408

Closed Luca1991 closed 1 month ago

Luca1991 commented 1 month ago

What were you trying to do?

I wanted Cork to be shown in menu bar and launched without its main window.

What was the problem?

I enabled from Settings menu: 1) "Show in Menu Bar" 2) "Open Cork without its main window"

Now when I start Cork I no longer see the main window, nor the icon in the menu bar.

IMPORTANT NOTE: If I only enable "Show in menu bar", the menu bar icon displays correctly.

Error logs

Is this even needed for this bug report?

App Version

1.4.5

App Acquisition

Bought

Final checklist

buresdv commented 1 month ago

Thanks for the report, I'll look into it. It might just take a while, because I'm still transitioning the rest of the codebase to the new conventions introduced in macOS 15. Couldn't test them in advance because I only have one Mac, and it's my only work machine!

megabubbletea commented 1 month ago

Thanks @Luca1991 and @buresdv. Can confirm I have the same issue after upgrading to macOS 15 been bugging me a couple days now and thought it was just me since no-one had reported it yet. 😂

Thisisauser6443 commented 1 month ago

I've also got the same issue, but the kicker here is that I'm still on Sonoma

bigtreiber commented 1 month ago

Same issue here since 3 weeks ... Cork is unusable :-( Any chance this issue will be addressed in the near future?

buresdv commented 1 month ago

I looked into it and this is definitely an Apple bug. As you can see here, the icon is actually there, but it's invisible: Snímek obrazovky 2024-10-12 v 12 04 59

The problem is here:

func applicationWillFinishLaunching(_: Notification)
{
    if startWithoutWindow
    {
        NSApp.setActivationPolicy(.accessory) <-- here
    }
    else
    {
        NSApp.setActivationPolicy(.regular)
    }
}

Setting the activation policy to .accessory is what breaks the entire process. I have not changed anything in this code since the feature came out almost a year ago, so this is something that Apple did.

I implemented a fix that removes the option to start the app without the main window, which also fixes this issue until Apple fixes it on their end. It's live on main and a new version will come out later today to address this issue for those not self-compiling.

Luca1991 commented 1 month ago

Hi @buresdv Thanks a lot for the workaround, I hope Apple fixes this bug soon. Should I close this issue now?

buresdv commented 1 month ago

No problem @Luca1991, thank you for your patience. I will close the issue 😊

buresdv commented 1 month ago

The release of the hotfix got a bit delayed because I might have discovered another thing Apple broke - I'm waiting for testers to get back to me

buresdv commented 1 month ago

Implemented in release 1.4.6

megabubbletea commented 1 month ago

Nice. Good to see the Cork icon back in the menu bar!