-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(ios, messaging): register background handler task #4180
Conversation
…istering background task
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/invertase/react-native-firebase/j37xrco4o |
packages/messaging/ios/RNFBMessaging/RNFBMessaging+AppDelegate.m
Outdated
Show resolved
Hide resolved
packages/messaging/ios/RNFBMessaging/RNFBMessaging+AppDelegate.m
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making this PR @davx1992 !
What a tricky issue, this makes sense theoretically, and worst case I don't believe it can do any harm?
@Salakar this is good one - there is linked commentary but the essential idea is: dispatch_after won't run if app is live but in background, but starting up this background task thaws the queue. Solves the symptom of FCM events delayed and only pasting when backgrounded app goes foreground.
Saw this on the issue earlier and it was a 'doh' moment for me, we should have had this in originally but I completely forgot about it when rewriting messaging 🙈 so LGTM. |
…nvertase#4180) * Minor fix to handle notifications in background state, now we are registering background task * Apply suggestions from code review Co-authored-by: Mike Hardy <[email protected]>
Description
This PR is needed to fix problem reported in this issue #4104 .
#4104 (comment)
Related issues
Fixes #4104
Release Summary
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Nothing to add.
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter