Commit 94380cb
Gate Metro connectivity on RCT_DEV_MENU instead of RCT_DEV (#57080)
Summary:
Pull Request resolved: #57080
When an iOS app is built with the React Native dev menu enabled (`RCT_DEV_MENU=1`) but `RCT_DEV=0`, the "Change Bundle Location" option can be visible while the Metro connection path remains compiled out. This makes the setting ineffective.
This gates the Metro host override path on `RCT_DEV_MENU` instead of `RCT_DEV`, matching the flag that controls whether the dev menu exists. Auto-discovery via `guessPackagerHost` remains behind `RCT_DEV` because it is a development convenience for full dev builds. Builds that do not set `RCT_DEV_MENU=1` keep the same preprocessor output because `RCT_DEV_MENU` defaults to `RCT_DEV`.
Changelog:
[iOS][Fixed] - Allow iOS apps with the dev menu enabled (`RCT_DEV_MENU`) to connect to Metro via "Change Bundle Location"
Reviewed By: huntie
Differential Revision: D107524388
fbshipit-source-id: 9d1281c6829b50ca45be9deba0d37e10d6466ee21 parent d53c7b5 commit 94380cb
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| |||
0 commit comments