-
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(messaging): initialize app props method to fix isHeadless property #4082
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Salakar
reviewed
Aug 13, 2020
false negative on E2E in iOS this time (android ran clean!), I restarted it, will look at iOS next |
Salakar
reviewed
Aug 14, 2020
Salakar
changed the title
fix(messaging, iOS): initialise app props method to fix isHeadless property
fix(messaging): initialize app props method to fix isHeadless property
Aug 15, 2020
hmhm2292
pushed a commit
to hmhm2292/react-native-firebase
that referenced
this pull request
Jul 13, 2021
invertase#4082) Co-authored-by: Mike Diarmid <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP - I have not been able to test properly (outside of preliminary tests) because the FCM gods are not with me today, and my messages are being blocked to my device when my app is in a quit state. Will try again soon unless someone else has it all set up and would like to confirm.
Description
Created a
initializeAppProps
helper method. This ought to guarantee theisHeadless
property is present in the properties passed to the component registered. i.e.registerComponent
component. This is used when the app is in a quit state and receives a message via FCM for iOS. ThesetBackgroundMessageHandler
is called and the app is also silently booted, this prop will allow the developer to returnnull
based onisHeadless === true
.The bug is a result of the application booting before the
isHeadless
property is added to theappProperties
for theRCTRootView
instance.Related issues
fixes #3983
Release Summary
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter