I have a debug and release configuration. I've duplicated debug scheme and configuration, and set the new (duplicate of debug) scheme to the duplicate of debug configuration. I've had to manually set DEBUG=1 to the new configuration too (for some reason it doesn't get copied).
Now in the new configuration when I hit the return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; line it returns nil and crashes with the following error:
No bundle URL present.
Make sure you're running a packager server or have included a .jsbundle file in your application bundle.
Metro is running. If I switch to the default Debug scheme, it works normally and [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"] returns http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=my.bundle.id.redacted which is correct and working.
Why isn't my duplicated scheme/config (that only has bundle ID overridden), which is a direct duplicate of my working Debug scheme/config returning nil for the JS bundle path?
-
1Having the same issue when I'm trying to upgrade from RN 0.68.7 to 0.72...did you ever figure it out?marcshilling– marcshilling2023年12月14日 15:26:12 +00:00Commented Dec 14, 2023 at 15:26