Skip to content

[Feature request]: Expose UNNotificationSettings.alertSetting to check if alerts are enabled #1467

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

Open
2 of 4 tasks
erdemyerebasmaz opened this issue Apr 12, 2025 · 0 comments

Comments

@erdemyerebasmaz
Copy link

erdemyerebasmaz commented Apr 12, 2025

Is there already an issue requesting this feature?

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Use case

We have a feature that relies on silent push notifications but they are not delivered when all notification alert types(e.g. Lock Screen, Banners, Notification Center) are disabled*, even when the app is on the foreground.

We'd like to display a warning to the user if alerts are disabled, to inform them that our feature requires at least one alert type to function.

*: If all alert types are disabled, iOS deems the notification non-deliverable and drops it before it reaches the Notification Service Extension.

Additionally, please share any alternative solutions you have considered. Have you explored existing packages on pub.dev that might already address this problem?

Alternate solution is to use platform channels to access UNNotificationSettings.alertSetting, and that'll be the approach we'll take in the meantime but, I thought this is better suited to be part of this plugin.

I was unable to find an existing package on pub.dev that exposes this setting.

Proposal

Expose UNNotificationSettings.alertSetting to check if alerts are enabled.

Specific requirements or considerations

We don't have additional requirements as silent push notifications are delivered as long as one alert presentation style is enabled.

Other developers may be interested in learning the status of specific alert presentation settings such as:

Additional information or context

UNNotificationSettings.alertSetting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant