Open playerx opened 5 hours ago
One note:
When the app is running, the push notification itself is received from OneSignal in the event, but it's not displayed in iOS. This code doesn't do anything: event.notification.display()
Few observations:
If I comment event.preventDefault()
line, and keep only event.notification.display()
, I get the following error:
ERROR: OSNotificationWillDisplayEvent.notification.display cannot be called due to timing out or notification was already displayed.
onWillDisplay
is triggered twice on one push notification.
What happened?
No push notification received when the App is in Focus, addForegroundLifecycleListener & event.notification.display() have no effect.
Also tried zero ForegroundLifecycleListener with no luck, still no Push Notification displayed when the app is focused.
If the app is minimized or closed, I receive push notification from OneSignal successfully.
I'm upgrading project from older version SDK and replacing the following code:
with:
Please check the full example in
Steps to reproduce
.Steps to reproduce?
What did you expect to happen?
My expectation was to receive Push Notifications, even if the app is Active. But the result is following:
OneSignal iOS SDK version
5.2.6 (also tried 5.2.5)
iOS version
13
Specific iOS version
Relevant log output
Code of Conduct