Comments (4)
If you include a notification block and a data block it is considered a "mixed" content message
the message will not trigger a background handler ever as it will instead (at the deeper firebase-ios-sdk layer) trigger a user-visible notification (but not start your app! no handlers called!).
If the user interacts with the message it will open your app and trigger onNotificationOpened with message contents that include the data block
I believe our documentation here may not be accurate and it conflicts slightly with upstream 🤔 - it would require some testing to see. The difficulty with testing is that there are a lot of conditions to meet in order for the test to be accurate
- setBackgroundHandler needs to be passed an async function that does no UI updates and returns a Promise
- the JSON needs to be perfect with priorities etc
- the device needs to have background refresh enabled and otherwise deliver the message - verified by watching device logs while plugged into developer machine via Xcode console on running app or Console.log
Upstream docs state this, which makes me think the behavior you observe is by design:
When in the background, apps receive the notification payload in the notification tray, and only handle the data payload when the user taps on the notification.
from react-native-firebase.
Hi, could you solve the problem? @alexstock1
from react-native-firebase.
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.
from react-native-firebase.
I am also facing this issue.
from react-native-firebase.
Related Issues (20)
- 🔥[🐛] Flaky builds in GitHub Actions HOT 4
- [🐛] Auth azure AD firebase openid connect
- __55-[FIRDLJavaScriptExecutor webView:didFinishNavigation:]_block_invoke_2 EXC_BAD_ACCESS (KERN_INVALID_ADDRESS) HOT 3
- 🔥 [🐛] setConsent() not working HOT 2
- IOS Build Issue in Azure Pipeline after updating macos Version to 13 and xcode Version to 15. HOT 1
- [🐛] Enable Firebase Analytics DebugView for TestFlight builds HOT 1
- Undefined symbols _SKANErrorDomain - React Native on Mac M1 Silicon HOT 1
- [🐛] Build failed on a fresh React Native install HOT 1
- [🐛] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly": HOT 3
- [🐛] setBackgroundMessageHandler not working in iOS 17.3.1? HOT 4
- [Error: [messaging/unknown] java.io.IOException: TIMEOUT] HOT 1
- [🐛] Crashlytics not recording anything in the dashboard in ios HOT 9
- [📚] Remote Config & Analytics HOT 1
- [🐛⚠️] iOS Build Fails - Value of optional type '?' must be unwrapped to refer to member 'storage' of wrapped base type 'any StorageProvider' (Optional Chaining) HOT 42
- [🐛] Firebase Phone Auth Not Working - (React Native 0.76.8) RNFirebase Version 18.6.1 HOT 8
- 🔥 [🐛] Sudden IOS build failures on expo that previously had worked HOT 3
- Searching for inspections failed: undefined method `map' for nil:NilClass HOT 1
- 🔥[🐛] iOS - build error: Library not found for -lFirebaseInstallations HOT 3
- [🐛]🔥 include of non-modular header inside framework module 'FirebaseSessions.sessions_nanopb' HOT 1
- :fire:[🐛] iOS not building due to multiple undefined symbols HOT 1
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.