-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
PushNotificationIOS.setApplicationIconBadgeNumber() doesn't work if the app is in background state. #5
Comments
same issue ! . did you find solution? |
I found a solution for this problem. if you are sending pushes with firebase, you can configure https://firebase.google.com/docs/cloud-messaging/send-message#when_to_use_platform-specific_fields |
Anyone found a solution to this? |
Anyone found a solution to this issue? I have the same problem too! :( |
Correct me if I'm wrong but I believe iOS restricts all apps in background.
I think onReceived fires when your app transitions back to active state so it 'looks' like setState worked. |
For oneSignal background handling of quantity of badges on iOS try out do not use onesignal listener but PushNotificationIOS.addEventListener('notification',callback), works fine for me, and ofc don't forget that your oneSignal headings should contain "content_available":true field within for wake up the app on push receiving |
This issue was originally created by @JulienUsson as facebook/react-native#22740.
Environment
Description
PushNotificationIOS.setApplicationIconBadgeNumber()
doesn't work on IOS if the app is in background state.Reproducible Demo
The text was updated successfully, but these errors were encountered: