Problem
On iOS, the Change bundle location / Configure bundler option in the React Native dev menu has no effect in HybridApp. The iOS app delegate hardcodes its debug bundle URL to localhost:8081 on the simulator and <ip.txt host>:8081 on a physical device, which bypasses RCTBundleURLProvider. That provider owns the host and port that the dev menu saves to RCTBundleURLProvider.sharedSettings.jsLocation, so a developer running Metro on a non-default port or host cannot point the app at it.
On Android the dev menu does take effect, but the chosen Metro server and bundle location are not persisted across app starts. That part is fixed upstream in facebook/react-native#57425 and is expected to ship with React Native 0.88, so it is not addressed here.
Solution
iOS debug builds now resolve the index entrypoint through RCTBundleURLProvider instead of building the URL by hand. This makes the app honor a Metro host and port configured from the dev menu, while keeping React Native's existing ip.txt and localhost discovery and its bundled main.jsbundle fallback. Release builds still load the packaged main.jsbundle, and Android is unchanged because it already delegates Metro URL handling to React Native.
PR
https://github.com/Expensify/Mobile-Expensify/pull/14058
Issue Owner
Current Issue Owner: @chrispader
Issue Owner
Current Issue Owner: @chrispader
Problem
On iOS, the Change bundle location / Configure bundler option in the React Native dev menu has no effect in HybridApp. The iOS app delegate hardcodes its debug bundle URL to
localhost:8081on the simulator and<ip.txt host>:8081on a physical device, which bypassesRCTBundleURLProvider. That provider owns the host and port that the dev menu saves toRCTBundleURLProvider.sharedSettings.jsLocation, so a developer running Metro on a non-default port or host cannot point the app at it.On Android the dev menu does take effect, but the chosen Metro server and bundle location are not persisted across app starts. That part is fixed upstream in facebook/react-native#57425 and is expected to ship with React Native 0.88, so it is not addressed here.
Solution
iOS debug builds now resolve the
indexentrypoint throughRCTBundleURLProviderinstead of building the URL by hand. This makes the app honor a Metro host and port configured from the dev menu, while keeping React Native's existingip.txtandlocalhostdiscovery and its bundledmain.jsbundlefallback. Release builds still load the packagedmain.jsbundle, and Android is unchanged because it already delegates Metro URL handling to React Native.PR
https://github.com/Expensify/Mobile-Expensify/pull/14058
Issue Owner
Current Issue Owner: @chrispaderIssue Owner
Current Issue Owner: @chrispader