-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 not asking for permission to show notifications #4974
Comments
Sadly this is due to Apples enforcement policies. We cannot show a native notification unless the app has been packaged and run through the app launcher. It will follow the standard process of shipped via the store or a package, or installed using "fyne install". |
Hmmm, |
Fyne install does support Darwin. It supports all the platforms we build for. If for some reason you are not seeing follow-up notifications please open an issue, this is not a known problem. |
The
So it explicitly says only mobile platforms. If I do |
Yikes! Docs need updated. What it means is you can install to current OS or one of the mobile platforms. Don't pass an os parameter and it will install on the current OS |
Checklist
Describe the bug
If I create and show a notification on my Mac, it shows an
osascript
commandline created notification. Confusing, because the icon is different from my app and, more problematic, it contains an 'open' button which opens an empty 'Script editor' folder when clicked...Looking at the code I find this a fallback method for showing notifications.
I did not understand why the fallback was shown because the code is explicitly first asking for permission and if allowed should show normal notifications.
Looking in the app log I find this:
So it seems the app is not properly setup to ask for permission?
I found this Apple document that might relate to this:
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_aps-environment
It says
To add this entitlement to your app, enable the Push Notifications capability in Xcode.
. So I assume this requires a change in the xcode project that is used for building darwin apps.How to reproduce
Create a minimal notification app. Build for darwin and run on MacOS.
Screenshots
No response
Example code
Fyne version
2.4.5
Go compiler version
go1.21.5 darwin/amd64
Operating system and version
MacOS Sonoma 14.5 (Intel)
Additional Information
No response
The text was updated successfully, but these errors were encountered: