-
Notifications
You must be signed in to change notification settings - Fork 263
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
Push notifications disappear if app is opened #406
Comments
@christopheblin does this occur for you for all notifications, even where you dont set any badge count related fields? |
@christopheblin also, are you opening the app at any point before pulling down Notification Center? |
does this occur for you for all notifications, even where you dont set any badge count related fields? are you opening the app at any point before pulling down Notification Center? |
OK I got it working, I was misled by the doc saying "OneSignal_disable_badge_clearing = false in your application's Info.plist." at https://documentation.onesignal.com/v5.0/docs/troubleshooting-ios#section-previous-push-notifications-disappear Indeed, you must set this flag to true (instead of false) -> OneSignal does not clear the badge automatically anymore when the flag is true. This is done at
The counterpart, of course, is that you have to do decrement/clear the badge count manually because the operating system does not automatically decrement the badge count when you open the app ! All that said, the only thing that really works for badges (be it for iOS or Android) is that the server must send the number of unread notifications to display. |
Thanks for noticing that, we've fixed our doc |
@Nightsd01 It still happens. https://documentation.onesignal.com/docs/troubleshooting-ios#section-previous-push-notifications-disappear. This solution is not working. My notifications, which come when app opens, disappear in Notification Center. |
Push notifications disappear if app is openedHello everyone please try this below snippet
Note :- just need to add .list in this method so you will get disappear push notification Thanks |
Description:
If my app is opened and a notification is received, the app is briefly displayed on the top of the screen => OK
Now, if I open the iOS notification panel by dragging the top of the screen to the bottom, I can see the notification but it immediately disappear.
From what I've seen, this may be due to https://documentation.onesignal.com/v5.0/docs/troubleshooting-ios#section-previous-push-notifications-disappear
=> this is not the case, the notification is sent with "Badges | Increment by 1" (notif id = 43cc6863-4def-438d-9296-ee284c1b39c4) and I also tried using this flag
The closest issue I find about this here is #338, however this does not occur (i.e I correctly receive push when app is closed and app correctly opens when notif is clicked)
Environment
iOS SDK installed with pod 'OneSignal', '>= 2.6.2', '< 3.0'
Steps to Reproduce Issue:
The text was updated successfully, but these errors were encountered: