Data-only message not received on foreground on iOS #4614
Unanswered
lucasfronza
asked this question in
Q&A
Replies: 1 comment 6 replies
-
Yeah, there is something like adb for ios. Also, what does the message you're sending look like? Please show us. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey! 👋
First of all, thanks very much for taking the time to read and reply!
I've seen plenty of people having trouble receiving data-only messages while the app is on background or quit states. My case is the very opposite. We don't care for background messages, just for foreground ones. So everything from now on is considering that the app is on foreground.
For Android, both "notification + data" and "data-only" messages are picked up by the
.messaging().onMessage(...)
listener. For iOS, only "notification + data" is.Some questions that I have:
1- How to debug if the message is received by the iOS device? Like using
adb
for Android? Or since it is a data-only message, it is handled directly by the JS code and does not go through the native side? (we are not usingcontent-available: true
)2- I added many breakpoints on all the native
didReceiveRemoteNotification
andwillPresentNotification
methods that I could find, but they are only "called" when using "notification + data" messages. Which methods should the data-only messages go through? Where to look for?Some extra info:
@react-native-community/push-notification-ios
,react-native-push-notification
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions