2

I am using PushNotificationIOS for my iOS app notifications handling. When the app is in background and I get notifications they show up in the tray. But when I open the app(either by tapping on notification or the app icon) all the notifications get cleared from the tray.

Found this link that says this happens due to setting the applicationIconBadgeNumber to 0. But I am not doing it anywhere in my app.

Jawad
  • 83
  • 6
  • Did you integrate the native code from https://facebook.github.io/react-native/docs/pushnotificationios.html? Can you show us any code at all? – Dan Mar 19 '18 at 16:49
  • Yes @Dan. That's all there in place and the notifications work all fine. Just that it gets cleared on launch of the app. Happens on switching the app from background to foreground. – Jawad Mar 19 '18 at 16:51
  • My application does the same, thats the default behaviour of a notification. If you receive one, then open the app, it gets cleared. – Dan Mar 19 '18 at 16:53
  • I believe that should happen only if I tap on the notification. And only the one that I tap on should get cleared. Found [this](https://snack.expo.io/rk7VdlH6b) expo link to check notifications. Notifications don't get cleared until I click on them. – Jawad Mar 19 '18 at 17:04

0 Answers0