-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS Notification: Wrong icon + opens script editor #5100
Comments
Apple has changed how notifications work and a Go binary executed in that way is not permitted to send notifications. You have to be a bundled app executed through their launcher. Instead of "make" or "go run" you should call "fyne install" and then run the app from macOS launcher - you'll see that notifications appear as you would expect. If you are aware of any workarounds that is great but reading their docs we cannot find any actual API call that is permitted outside of the bundle context. |
@andydotxyz Thanks a lot of your quick reply! Sadly, this is still not working for me. No matter what I do, I cannot seem to get the correct notification icon & click behaviour. Could you try cloning the repo and verifying this is the case for you, too?
Also, all works fine up to [email protected] and starts being broken at [email protected]. This seems quite natural since that release included PR #1833 which included commit fc94fa. |
@andydotxyz Ah, I see the comment below now. In other words, it's not enough to package / install, it also has to be signed, i.e. one needs to have the Apple dev account, certificates, etc., correct? Line 46 in 7d81356
|
Ahh you're right I forgot that part. |
Checklist
Describe the bug
On MacOS, when you send an app notification, the icon doesn't correspond to the icon of the app. Instead, the script editor icon is shown. Clicking the notification doesn't open the app but instead opens the script editor.
This seems to be a regression of this old bug #935 that was solved back in 2020. I tried adding a simple notification e.g. to the GoTune app. Everything works as it should on my machine there. To me, this implies the problem is not related to my version of Go or MacOS but rather to the Fyne version. Or, naturally, it could mean that I'm doing something wrong. But, I tried both the
FyneApp.toml
approach and setting the icon on the app manually.How to reproduce
make
to package the appmake run
to run the appScreenshots
Example code
Fyne version
2.5.1
Go compiler version
1.22.5 darwin/amd64
Operating system and version
Sonoma 14.6.1
Additional Information
No response
The text was updated successfully, but these errors were encountered: