Skip to content
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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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