react-native-onesignal
react-native-onesignal copied to clipboard
Badge not clean after open app
Description:
In app, after i send one push, the badge not clean after.
https://user-images.githubusercontent.com/17353066/180772688-10d70549-0c1a-4aa8-ae50-e78aa39c9d9b.MP4
Environment
-
What version of the OneSignal React-Native SDK are you using? R: "^4.3.0"
-
How did you add the SDK to your project (eg. npm) R: yarn
Steps to Reproduce Issue:
- Send one push
- Badge is incremented
- Open app
- Close app
- Send another push
- Badge not clean
@Marcuspo There are few things that can cause the badge count internal counter to be reset back to 0. It requires the following to be setup correctly:
- NSE (Notification Service Extension)
- App Groups
- Double check step "4.4 Add App Group"
- If you have an older OneSignal app you created in June 2018, the badge setting can be changed from setup
- This used be tracked on player.badge_count
If you have an issue with the NSE or App Groups still after trying to debug you may want to also include onesignal-expo-plugin as this automatically sets these up for you.
Same problem
I'm having the same problem on iOS since few weeks, it was working before.
@jkasten2 We have check your recommandations but still no luck, the badge is no reseting back to 0 on a new notification as it should be : https://documentation.onesignal.com/docs/troubleshooting-ios#previous-push-notifications-disappear
The problem is happening since 1 month (no changes on the app notification source code), we are using react-native-onesignal 4.4.1. I guess the problem appeared after an iOS or Xcode update.
For us, it's been almost 2 years now that we have the same problem. To date it has not been resolved.
Any updates on this?