react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

initialProperties For RN 0.69 & RNFBMessagingModule

Open enchorb opened this issue 1 year ago • 1 comments

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?

enchorb avatar Aug 07 '22 13:08 enchorb

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];

enchorb avatar Aug 07 '22 17:08 enchorb

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.

github-actions[bot] avatar Dec 05 '22 19:12 github-actions[bot]

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

mikehardy avatar Dec 05 '22 19:12 mikehardy

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.

github-actions[bot] avatar Jan 02 '23 21:01 github-actions[bot]