react-native-firebase
react-native-firebase copied to clipboard
initialProperties For RN 0.69 & RNFBMessagingModule
For React Native 0.69+ The AppDelegate.mm
file has changed to pass in initialProperties
by doing:
NSDictionary *initProps = [self prepareInitialProps];
UIView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:initProps];
For RNFBMessagingModule it is required to do the following:
NSDictionary *appProperties = [RNFBMessagingModule addCustomPropsToUserProps:nil withLaunchOptions:launchOptions];
UIView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:appProperties];
Should we just be using the later or is there some custom configuration required?
I've done this for the time being which seems to be working
NSDictionary *appProperties = [RNFBMessagingModule addCustomPropsToUserProps:nil withLaunchOptions:launchOptions];
NSDictionary *initProps = [self prepareInitialProps];
NSMutableDictionary *configProps = [initProps mutableCopy];
[configProps addEntriesFromDictionary:appProperties];
UIView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:configProps];
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.
This one could maybe use a PR for the docs? Is there anything wrong with the code or is it a docs issue? If so each page has an edit link top right and the github web UI for docs PRs is really fast
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.