这个问题很容易解释:我刚刚更新了 XCode 命令行工具,现在npx react-native run-ios --device
给出了这个错误:
npx react-native run-ios --device
info Found Xcode workspace "LsRecordApp.xcworkspace"
error No iOS devices connected.
如果我跑
xcrun xctrace list devices
== Devices ==
MacBook Pro di Alessandro (4DE942D7-9E58-5917-AED1-F0B770F513E7)
iPhone di Alessandro (15.2) (00008020-000459C40CD1002E)
任何想法?
npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 11.6.2
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 1.91 GB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.15 - /usr/local/bin/yarn
npm: 8.3.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
Watchman: 2021.09.27.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
Android SDK: Not Found
IDEs:
Android Studio: Arctic Fox 2020.3.1 Patch 4 Arctic Fox 2020.3.1 Patch 4
Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
Languages:
Java: 11.0.9.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.0 => 0.66.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found