Skip to content
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 Images not displayed in background mode + setBackgroundMessageHandler not triggering #8041

Open
haytamBn opened this issue Sep 28, 2024 · 6 comments
Labels
blocked: customer-response platform: ios plugin: messaging FCM only - ( messaging() ) - do not use for Notifications type: bug New bug report

Comments

@haytamBn
Copy link

haytamBn commented Sep 28, 2024

Bug Summary:

I followed the iOS Notification Images documentation for showing an image in a push notification while the app is in the background, but the image does not display.
Additionally, the setBackgroundMessageHandler function is not being triggered as expected in background mode on iOS.
Environment Info:

React: 18.3.1
React Native: 0.75.2
@react-native-firebase/app: "^21.0.0",
@react-native-firebase/messaging": "^21.0.0",
Node: 18.19.0
Yarn: 3.6.4
NPM: 10.2.3
iOS SDK: 17.5
Testing Device: Real device ios version (17.6.1)
Steps to Reproduce:

Set up Firebase Cloud Messaging and configure it according to the iOS Notification Images documentation.
Use setBackgroundMessageHandler to handle background messages.
Send a notification with an image URL in the payload.
Test the app in background mode on iOS.
Expected Behavior:

The image should be displayed in the notification when the app is in background mode.
The setBackgroundMessageHandler should trigger when a message is received in the background.
Actual Behavior:

The image does not appear in the notification when the app is in background mode.
The setBackgroundMessageHandler function is not triggered.

@haidarmy
Copy link

haidarmy commented Oct 5, 2024

same issue

@truongngodang
Copy link

same issue image not working

@russellwheatley
Copy link
Member

Have you followed the documentation for sending a notification with an image? https://rnfirebase.io/messaging/server-integration#send-messages-with-image

Also - if your background message handler is not firing, it makes me wonder if there is a more fundamental issue with your setup that has been incorrectly configured.

@russellwheatley russellwheatley added platform: ios plugin: messaging FCM only - ( messaging() ) - do not use for Notifications blocked: customer-response type: bug New bug report and removed Needs Attention type: bug New bug report labels Oct 24, 2024
Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@github-actions github-actions bot added the Stale label Nov 21, 2024
@mikehardy
Copy link
Collaborator

I want to keep this open a bit - I'm closing in on a reproducer / test platform for FCM + Apple platforms and this is a case that should be validated

@github-actions github-actions bot removed the Stale label Nov 21, 2024
@sen46Sko
Copy link

+1
having the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: customer-response platform: ios plugin: messaging FCM only - ( messaging() ) - do not use for Notifications type: bug New bug report
Projects
None yet
Development

No branches or pull requests

6 participants