-
Notifications
You must be signed in to change notification settings - Fork 198
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
iOS - Notification not shown on with the app in foreground with [email protected] #781
Comments
@fabioz23 Thanks for reporting, these symptoms sounds like Capacitor may have it's own |
i've tried to open an issue firstly on capacitor repo but i don't have received an answer yet. |
@fabioz23 I took a quick look, found a possible setting on Capacitor's end ionic-team/capacitor#5542 (comment). The root of the issue is both Capacitor and OneSignal both handle the |
@jkasten2 I can confirm your description. Capacitor callback take the lead to OneSignal one for the return value. So, when we use OneSignal plugin we have to disable the handleApplicationNotifications options in Capacitor configuration. Unhappily, this option is not configurable from the capacitor.config.js file. To do that I had to do 2 things : In
And in
There is only one TS issue with the type |
@seb-doncker i followed your suggestion, and i think i'll need Patch-Package to edit capacitor code everytime the dependency is installed. |
Hey, looks like this issue has been resolved since 2022. |
Description:
After project upgrade (from [email protected], [email protected] to [email protected], [email protected]) Onesignal push notification not shown when the app is in foreground.
This happens despite having configured the proper handler for foreground notifications like Onesignal wiki suggest.
Environment
@capacitor/cli: 3.4.3
@capacitor/android: 3.4.3
@capacitor/core: 3.4.3
@capacitor/ios: 3.4.3
Steps to Reproduce Issue:
Anything else:
My workaround is to forcibly disable handleApplicationNotifications member of NotificationRouter class:
But with this ugly workaround doesn't reset the unread notification badge.
The text was updated successfully, but these errors were encountered: