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

Using main bundle instead of thread bundle in iOS release mode (react-native 0.68.1) #139

Open
therealgilles opened this issue Apr 19, 2022 · 2 comments

Comments

@therealgilles
Copy link

I believe this change broke using the correct thread bundle in iOS release mode with react-native 0.68.1, and instead using the main bundle:

THREAD NAME App/Workers/my_worker  // <-- correct path
starting Thread: file:///Users/.../Library/Developer/CoreSimulator/Devices/.../my-app.app/main.jsbundle // <-- wrong bundle

Anyone has a suggestion for a fix?

@therealgilles
Copy link
Author

therealgilles commented Apr 19, 2022

Here is a possible fix in ThreadManager.m but probably not the best one:

//NSURL *threadURL = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:name fallbackResource:name];
  NSURL *threadURL = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:name fallbackURLProvider:^NSURL * {
          return [[NSBundle mainBundle] URLForResource:name withExtension:@"jsbundle"];
      }];

@RustyTheBoyRobot
Copy link

Can confirm this fixes things for RN 68. I had tried another suggestion of simply removing the fallbackResource param, but that used the wrong bundle for the thread.

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

No branches or pull requests

2 participants