Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.
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

@dilawer

Description

@dilawer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions