react-native: React-Native IOS real device does not connect to Metro server
Description
My Simulator works fine it connects to the development server or metro. But on my ios real device is not connected .
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 14.3.1
CPU: (8) arm64 Apple M1
Memory: 71.36 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.19.0
path: /opt/homebrew/bin/node
Yarn:
version: 1.22.17
path: /opt/homebrew/bin/yarn
npm:
version: 10.2.3
path: /opt/homebrew/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.14.3
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- visionOS 1.0
- watchOS 10.2
Android SDK: Not Found
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11330709
Xcode:
version: 15.2/15C500b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.4
wanted: 0.73.4
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Stacktrace or 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
https://github.com/ladybirdweb/faveo-support-app
Screenshots and Videos
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 25
my app is installed in real device succesfully but not connected to metro bundler with xcode 16.2 and apple m4 chip, rn version 0.73.9 I already done lot of things from stack overflow , chatgpt, I connected my device hotspot to my system still it is not working also configure bundle in app also tried with same wifi in system and device HELP THANKS
System: OS: macOS 15.2 CPU: (8) arm64 Apple M2 Memory: 1.30 GB / 16.00 GB Shell: version: “5.9” path: /bin/zsh Binaries: Node: version: 23.5.0 path: /opt/homebrew/bin/node Yarn: Not Found npm: version: 10.9.2 path: /opt/homebrew/bin/npm Watchman: version: 2024.12.02.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.16.2 path: /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 24.2 - iOS 18.2 - macOS 15.2 - tvOS 18.2 - visionOS 2.2 - watchOS 11.2 Android SDK: Not Found IDEs: Android Studio: 2024.2 AI-242.23339.11.2421.12700392 Xcode: version: 16.2/16C5032a path: /usr/bin/xcodebuild Languages: Java: version: 23.0.1 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.5 wanted: 0.76.5 react-native-macos: Not Found npmGlobalPackages: “react-native”: Not Found Android: hermesEnabled: true newArchEnabled: true iOS: hermesEnabled: true newArchEnabled: true
what to do?
Shake your phone which has the app build installed, configure bundler- Give your Device IP (Laptop) address and Port : 8081 (port your running) and Reload
Please reopen this issue again I’m facing the same issue in “react-native”: “0.75.4”,
same issue, tried setting up a clean repo from scratch without expo. same thing happening. also, i can’t shake the device. no dev settings are appearing. localhost:8081/debugger-ui successfully opens on pc, on real device it doesn’t load. <PC_IP>:8081 successfully displays the bundle code on real device. localhost:8081 doesn’t. is this related to xcode configuration or something?
isn’t the debug if check should correctly get the url that the bundle is running on?? when not connected also shaking doesn’t work. i’ve been struggling on this one for 3 days now. need some help.
metro version: Welcome to Metro v0.81.4
package.json:
nodejs version: 18.18.2
IT’S NOT EVEN RETURNING NO BUNDLE URL PRESET ERROR. only at the first opening after a clean build. i’ve cleared the network settings of iphone still no help.
Thanks, this fixed my issue
On simulator it’s working in debug mode but when i connect real iOS device on debug mode that time metro is not connected any solution from your end.