-
Notifications
You must be signed in to change notification settings - Fork 61
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]: Badge Counter not resetting properly #527
Comments
@gadzilka Thanks for reporting and digging in and providing these debugging details. It seems the Notification Service Extension is running correctly as you were able to get debugging output from it.
Was this value also When did you create your app on the OneSignal dashboard? The defaults for badges are different if it was created in 2018 vs something newer. |
No, in step 3, after calling
It was old app, it was created a long time ago. Should I test a new one? What to do with the old one? Here are some additional logs from the main app in step 4 (user id and app id are hidden in logs):
|
I encountered the same issue in a native iOS app without using Unity. The problem stemmed from incorrect app group configuration. To resolve this, ensure that you're using the recommended app group, which should be added to both the If you're using a custom name for your app group instead of the recommended one, make sure this is reflected in the |
What happened?
After the badge counter is reset to 0 and a new push notification received with +1 on the badge, the old value is restored. Many of our customers report this issue to us from different apps.
Steps to reproduce?
What did you expect to happen?
Unfortunately, there are not many places in your code that can be debbuged. I tried to get more information from your Notification Extension.
In Step 5 before calling
OneSignal.didReceiveNotificationExtensionRequest
:onesignalBadgeCount
is 0 (this is the value from UserDefault associated with the app group)bestAttemptContent.badge
is 3 (the content of UNNotificationRequest)after calling
OneSignal.didReceiveNotificationExtensionRequest
onesignalBadgeCount
is 3 (the badge counter also has the same value)This means that your server send the wrong number for the badge counter. I can assume that something wrong happened in the app when you reset the badge counter and send the information to your server.
Unity version
Unity 2020.3.36f1
OneSignal Unity SDK version
3.0.3
Platform
iOS
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: