Skip to content

Notifications are not working on iOS #4966

Closed
@Gys

Description

Checklist

  • 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

I create a simple Fyne app only to test notifications. The app works on MacOS and Android. When I compile and install on iOS there is no notification.

The docs https://developer.apple.com/documentation/usernotifications/asking-permission-to-use-notifications state:

Local and remote notifications...

..., you must obtain permission to use them.

I think the must is critical here. Fyne provides no mechanism to ask for permission?

How to reproduce

The simplest notifications app will do.

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

iOS 17.5.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    unverifiedA bug that has been reported but not verified

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions