Problem
The React Native dev menu's Change bundle location / Configure bundler option does not reliably control where the JS bundle is loaded from in the HybridApp, and the configured Metro server/bundle location is not persisted as expected.
iOS
The iOS HybridApp app delegate hardcodes its debug bundle URL to localhost:8081 on the simulator and <ip.txt host>:8081 on a physical device. This bypasses RCTBundleURLProvider, which owns the host and port saved by React Native's Configure bundler dev-menu action. As a result, changing the bundler host/port in the dev menu has no effect — the app keeps loading from the hardcoded location.
Android
On Android, the previously configured Metro server / bundle location is not persisted across app restarts, so developers have to reconfigure it every time.
Expected behavior
- Debug builds should resolve the JS bundle through
RCTBundleURLProvider, honoring a configured Metro host and port while retaining React Native's existing ip.txt/localhost discovery and bundled main.jsbundle fallback.
- Release builds should continue loading the bundled
main.jsbundle.
- The configured Metro server/bundle location should persist across app restarts on Android.
Notes
Fix
Addressed by #98794.
Problem
The React Native dev menu's Change bundle location / Configure bundler option does not reliably control where the JS bundle is loaded from in the HybridApp, and the configured Metro server/bundle location is not persisted as expected.
iOS
The iOS HybridApp app delegate hardcodes its debug bundle URL to
localhost:8081on the simulator and<ip.txt host>:8081on a physical device. This bypassesRCTBundleURLProvider, which owns the host and port saved by React Native's Configure bundler dev-menu action. As a result, changing the bundler host/port in the dev menu has no effect — the app keeps loading from the hardcoded location.Android
On Android, the previously configured Metro server / bundle location is not persisted across app restarts, so developers have to reconfigure it every time.
Expected behavior
RCTBundleURLProvider, honoring a configured Metro host and port while retaining React Native's existingip.txt/localhost discovery and bundledmain.jsbundlefallback.main.jsbundle.Notes
Mobile-Expensifyrepo (Mobile-Expensify#14058).Fix
Addressed by #98794.