Skip to content

[Due for payment 2026-08-25] fix: Updating and persisting Metro server/bundle location #98797

Description

@mountiny

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 OwnerCurrent Issue Owner: @chrispader
Issue OwnerCurrent Issue Owner: @chrispader

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions