[IOS] Can't connect to metro on a real device
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript, react-native
- 领域
- devtools, mobile-dev
调研方向
先从报告中的 AppDelegate sourceUrlForBridge 设置和 npm start --host 选项入手,然后将报告中的设备配置与连接日志进行比较。复现依赖于一个私有仓库,并且报告列出了相互冲突的 React Native 版本;完成的标准是建立与 Metro 的可复现实机连接并确定原因。
由索引模型根据 Issue 内容生成。
描述
Description
My Simulator works fine it connects to the development server or metro. But on my ios real device it does not connect. I have tried running with npm start --host 0.0.0.0 / MAC_IP, using hotspot, enabling the USB iPhone cable and editing the sourceUrlForBridge in AppDelegate to connect to the specific host and port but nothing has worked.
Steps to reproduce
Connect ios real device with usb and same network.
React Native Version
0.73.4
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 26.2
CPU: (12) arm64 Apple M3 Pro
Memory: 342.70 MB / 18.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 24.11.1
path: /Users/bogomil.rusev/.nvm/versions/node/v24.11.1/bin/node
Yarn: Not Found
npm:
version: 11.6.2
path: /Users/bogomil.rusev/.nvm/versions/node/v24.11.1/bin/npm
Watchman:
version: 2025.08.11.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.1
- iOS 26.1
- macOS 26.1
- tvOS 26.1
- visionOS 26.1
- watchOS 26.1
Android SDK: Not Found
IDEs:
Android Studio: 2025.2 AI-252.27397.103.2522.14617522
Xcode:
version: 26.1.1/17B100
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.16
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.1
wanted: 15.0.1
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.6
wanted: 0.76.6
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace and logs
No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB.
info Reloading connected app(s)...
Reproducer
Private repo
Photos and videos
None
- 主要语言
- JavaScript
- 星标
- 5.6k
- 派生
- 702
- 平均合并
- 3 天 2 小时
- 30 天内合并 PR
- 44
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
react/metro 的其他 Issue
-
constant-folding-plugin emits 0/0 (NaN) for arithmetic on destructured bindings可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
[0.83.x] Backport micromatch removal and dotfile/multipart watcher fix together可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 1 天内回复
-
`dependencies is not iterable` / `Cannot read property 'reduce' of undefined`: `FileStore` serves zero-prefixed cache files as hits可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
维护者通常 1 天内回复
-
Async chunk URLs drop the file extension, so .cjs async imports fail with "Requiring unknown module"可能已有人在做 @dasjideepak 于 11 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 74/100
react/metro#1959 · 2 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 1 天内回复
相似的 Issue
-
check:passed feeds:remove
难度 1/5 1 小时以内 新手友好度 65/100
iptv-org/database#37176 · 1 条评论 · 1 个 reaction ·
维护者通常 9 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
hawk-digital-environments/HAWKI#443 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
feedback simulation workshop
难度 2/5 1-3 小时 新手友好度 66/100
githubnext/gh-aw-workshop#4370 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
AltimateAI/vscode-dbt-power-user#2089 ·