Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[IOS] Can't connect to metro on a real device

Đang mở
#1,637 1 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, react-native
Lĩnh vực
devtools, mobile-dev

Hướng nghiên cứu

Bắt đầu với thiết lập sourceUrlForBridge được báo cáo trong AppDelegate và các tùy chọn của npm start --host, sau đó so sánh cấu hình thiết bị được báo cáo với nhật ký kết nối. Việc tái hiện phụ thuộc vào một repository riêng tư, và báo cáo liệt kê các phiên bản React Native xung đột; hoàn tất có nghĩa là thiết lập được kết nối có thể tái hiện từ thiết bị thực đến Metro và xác định nguyên nhân.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
JavaScript
Star
5.6k
Fork
699
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
44

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của react/metro

Tất cả issue của react/metro

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.