Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

firebase.messaging().onMessage not triggered in ios device when app is in background #233

Open
dilawer opened this issue Nov 5, 2019 · 0 comments

Comments

@dilawer
Copy link

dilawer commented Nov 5, 2019

I want to receive a data-only notification and depending upon data I want to hit an api..
While app is in foreground everything is working fine as onMessage triggered, but in background the firebase.messaging().onMessage not triggered even I send "content_available" : true with data payload.

I read instructions giving in the link giving below.
https://github.com/invertase/react-native-firebase-docs/blob/master/docs/messaging/introduction.md

here is my code:
this.messageListener = firebase.messaging().onMessage((message) => {
//want to hit api depending upon coming data

	});

Testing on iPhone 6S plus (real device)

react-native : 0.58.5
react-native-firebase : 5.5.4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant