Skip to content

Reuse RCTBridge for the share view. Fixes #64#144

Open
rbscott wants to merge 1 commit intoalinz:masterfrom
rbscott:ios_shared_bridge
Open

Reuse RCTBridge for the share view. Fixes #64#144
rbscott wants to merge 1 commit intoalinz:masterfrom
rbscott:ios_shared_bridge

Conversation

@rbscott
Copy link

@rbscott rbscott commented Feb 8, 2019

I think this is the general idea for fixing memory issues inside of the share view. This still needs to be tested. I didn't see instructions for running react-native-share-extension independently for testing, so I am putting together a mini project to verify this works.

As implemented, this should be backwards compatible.

marctorrelles added a commit to marctorrelles/react-native-share-extension that referenced this pull request Mar 15, 2019
@mtzfactory
Copy link

Hi,

Do you have an example for newer React Native versions (0.59.x)?

I'm using react-native v0.59.5 and I see that the AppDelegate.m file has changed the way the view is created:

  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"appName"
                                            initialProperties:nil];

In previous versions was:

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"appName"
                                                 initialProperties:nil
                                                   launchOptions:launchOptions];

Should the share extension use the same coding to create the view?

@aschenkel
Copy link

hey @mtzfactory by any chance could u test this or recall an alternative to it? I know its been a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants