You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
This issue only relates to a single bug. I will open new issues for any other problems.
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.
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
func main() {
a := app.New()
w := a.NewWindow("Notification Example")
btn := widget.NewButton("Show Notification", func() {
notification := fyne.NewNotification("Notification Title", "This is the notification.")
a.SendNotification(notification)
})
w.SetContent(container.NewVBox(
widget.NewLabel("Click the button to show a notification."),
btn,
))
w.ShowAndRun()
}
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:
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".
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: