Skip to content
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

[Bug]: clearAll() is not resetting the badge count in iOS #961

Open
2 of 3 tasks
MuhammedRefaat opened this issue Oct 3, 2024 · 0 comments
Open
2 of 3 tasks

[Bug]: clearAll() is not resetting the badge count in iOS #961

MuhammedRefaat opened this issue Oct 3, 2024 · 0 comments

Comments

@MuhammedRefaat
Copy link

What happened?

In iOS, when opening or resuming the app, I'm calling OneSignal.Notifications.clearAll(); to clear the notifications and to reset the notifications badge count to Zero, but once a new notification is received the badge number shown is accumulated from the previous number instead of showing (1) as the notifications count.

Steps to reproduce?

1. Sent a number of notifications to the app (let's say 3).
2. Open/resume the app.
3. Call OneSignal.Notifications.clearAll(); once the app is opened/resumed.
4. Notifications and notification badge will be cleared.
5. Send a new notification to the app.
6. instead of showing (1) at the notification badge on app icon it will show (4).

What did you expect to happen?

Once notifications are cleared, the badge should be cleared, and when receiving a new notification the badge should show (1) not (previous notifications count + 1).

OneSignal Flutter SDK version

Release 5.2.2

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
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