Comments (2)
i receive the notification while the app is in Background or quit but the onMessage or backgroundMessageHandler methods never trigger.
You are sending what appears to be a "mixed" content message. As such the firebase-ios-sdk underlying code will post the notification and the handler in setBackgroundMessageHandler should be called but it has some of it's own requirements - it must be async / has to return a promise or it may not be registered/called, and if the device is in low power mode or has background refresh disabled (https://rnfirebase.io/messaging/usage#ios-background-limitation) then it will not be called
Other than that, not sure why this isn't working for you if those conditions are met. You might watch what happens when the device receives the message via a look at the device log in Console.app to see how iOS and firebase-ios-sdk native code handles the FCM receipt and delivery
from react-native-firebase.
It appears that the problem happened only while working with the emulator while everything works fine on a real device.
Fun fact: removing the APNS header from the notification sent fixed the problem for the emulator, but caused the functions to not trigger with a real device
from react-native-firebase.
Related Issues (20)
- Error: Patterns in 'instanceof" are not supported at language level '11'
- [🐛] Bug Report Title - Module Map Not Found!!! HOT 1
- 🔥[🐛] signInWIthPhoneNumber redirects to /firebaselink/auth on Expo development build HOT 5
- [🐛] [Android] Support 16kb page size for Android 15+ devices HOT 1
- ios/Pods/FirebaseSessions/FirebaseSessions/SourcesObjC/NanoPB/FIRSESNanoPBHelpers.h:29:9: Include of non-modular header inside framework module 'FirebaseSessions.FIRSESNanoPBHelpers': ios/Pods/Headers/Public/nanopb/pb.h' HOT 3
- Incremental Slowdown in Concurrent getDoc Requests on Android
- [🐛] Bug/notification tap action issue and background updating badge issue in iOS my android is working fine HOT 1
- ld: library 'nanopb' not found HOT 1
- [🐛] Firebase Setup Fails on Android Emulator - (React Native 0.74.5) RNFirebase Version 20.3.0 HOT 1
- White Screen Of death in release build at the time of crash and no logs in firebase crashlytics HOT 1
- [🐛] Modular API discrepancies from firebase-js-sdk HOT 2
- [🐛] Bug Report Title - On accept the notification App crashes in Android 14 HOT 1
- Duplicate push notificaion iOS on TestFlight HOT 4
- In Firebase Analytics Dashboard showing Landing Page as not set HOT 3
- [🐛] Relax the firebase-js-sdk import HOT 3
- npx expo run:ios fails after firestore installation HOT 8
- [🐛] 🔥 onNotificationOpenedApp() not running and getInitialNotification() not providing data when restoring app state from storage on Android HOT 2
- [🐛] 🔥 onMessage callback gets triggered multiple times on iOS 18 HOT 3
- [🐛] ERROR Error: You attempted to use a Firebase module that's not installed natively on your project by calling firebase.app(). android expo HOT 4
- [🐛] Crash in iOS 17 when a push notification is received HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-firebase.