react-native run-ios --device not working with XCode 12.5 CLI tools
See original GitHub issueEnvironment
System:
OS: macOS 11.3
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Memory: 626.05 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.2.0 - /var/folders/34/_v0h6lqn0x17yx6pppvqrnbmcjbc20/T/yarn--1619714124765-0.3284344217580091/node
Yarn: 1.22.10 - /var/folders/34/_v0h6lqn0x17yx6pppvqrnbmcjbc20/T/yarn--1619714124765-0.3284344217580091/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v14.2.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK:
API Levels: 23, 28, 29
Build Tools: 28.0.3, 29.0.2, 29.0.3
System Images: android-28 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 12.5/12E262 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_252 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Description
After upgrading to the latest version of Xcode (12.5), I can no longer run my react-native project on a physical device. Running react-native run-ios --device=X
always results in an error and a message that there are no available devices to run on:
I’ve tracked the issue down to this line. It seems that xcrun xctrace list devices
no longer outputs to stderr:
tail error
=> empty, tail out
=> list of devices. Changing the above line to stdout
instead of stderr
fixes the issue locally for me.
Reproducible Demo
This should be reproducible on any react-native project when running XCode 12.5, but if I’m mistaken, let me know and I’ll try to put together a minimal demo.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:16
- Comments:17 (2 by maintainers)
Top Results From Across the Web
React Native run-ios --device not working after upgrading ...
The question is pretty self explanatory: I just updated the XCode Command Line Tools and now the npx react-native run-ios --device is giving ......
Read more >"react-native run-ios --device" fa… | Apple Developer Forums
The react-native run-ios --device command fails with an error. The app runs on the simulator using the react-native run-ios command without any problem....
Read more >Troubleshooting - React Native
Open ~/Library/Developer/Xcode/DerivedData . and look for a folder named after your Xcode workspace (“RNTesterPods-AAAA” where “AAAA” is a ...
Read more >Using the macOS execution environment - CircleCI
jobs: build: macos: xcode: 13.4.1 steps: # Commands will execute in macOS container # with Xcode 12.5.1 installed - run: xcodebuild -version ...
Read more >React Native on Apple M1 Silicon without Rosetta-2 - Adapptor
This is unnecessary (even if running Xcode under Rosetta) and if you ... Do the following before installing CLI Tools, because Xcode (in ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ran into the same issue, and found the same solution as you. Temporarily fixing with the following patch-package patch:
@react-native-community+cli-platform-ios+5.0.1-alpha.2.patch
For others waiting for this fix in a new release of the cli, apply the above patch by placing it in a file called
@react-native-community+cli-platform-ios+5.0.1-alpha.2.patch
in your project folder, and running: