-
Notifications
You must be signed in to change notification settings - Fork 264
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
[Bug]: addForegroundLifecycleListener & event.notification.display() doesn't work as expected. #1510
Comments
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: |
Few observations:
|
Hi @playerx thanks for reporting. Just to confirm, even when you don't call Can you share the Verbose-level logs starting from when the notification is supposed to be received by the device? |
Hi @nan-li , that's correct even if I don't call Originally I've tried with capacitor-cordova plugin, next thought maybe there was an issue in that plugin and switched to iOS sdk directly, but the issue remains the same. I'll enable Verbose level logs and share it 👌🏻 |
Initialization Logs:
Logs after receiving a notification (when App was active):
|
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
* iOS 18.0.1 (Minimum Deployment Target: iOS 13.0)
Relevant log output
No error logs, everything seems fine in logs.
Code of Conduct
The text was updated successfully, but these errors were encountered: