react-native-notifications: onNotificationReceivedForeground not work when push remote notifications
onNotificationReceivedForeground not work when push remote notifications, but use localNotification is work, when I comment [RNNotificationsBridgeQueue sharedInstance].jsIsReady == YES remote notifications is trigger onNotificationReceivedForeground
RN: 0.42 react-native-notifications: 1.1.15 iOS: 10.3.3
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 8
- Comments: 16
@minhphung210 - the OS will not show a push notification in the curtain if the app is already in foreground, in this case only the listener gets fired. That is default OS behaviour.
I added
[RNNotificationsBridgeQueue sharedInstance].jsIsReady = YES;to myapplication didFinishLaunchingWithOptionsuntil this is fixedIndeed, I am facing the same issue
Why do we need the check for [RNNotificationsBridgeQueue sharedInstance].jsIsReady anyway? Additionally to my knowledge the JS thread is never running when app is background state, so the onNotificationReceivedBackground event can’t actually be received…