Please note , I'm looking for /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
util (lower-case), not the Instruments
app which can be found in Xcode.app/Contents/Applications
.
I have both Xcode12
and Xcode13-beta-5
on my computer. When run xcrun instruments -w <device id>
, Xcode13 says xcrun: error: Failed to locate 'instruments'
.
Locating the "instruments" in Xcode12:
olia@Olhas-MacBook-Pro % ls /Applications/Xcode.app/Contents/Developer/usr/bin/*instruments*
# output ✅
/Applications/Xcode.app/Contents/Developer/usr/bin/instruments
Locating the "instruments" in Xcode13:
olia@Olhas-MacBook-Pro % ls /Applications/Xcode-beta.app/Contents/Developer/usr/bin/*instruments*
# output ❌
zsh: no matches found: /Applications/Xcode-beta.app/Contents/Developer/usr/bin/*instruments*
Here, Xcode-beta.app
is Xcode13, and Xcode.app
is Xcode12.
There's no "instruments" util because it was deprecated in Xcode12
, and in Xcode13
it seems to be removed.
Apple recommends using xcrun xctrace
instead of xcrun instruments
in Xcode12. But as command xcrun instruments -w
is for pre-launching Simulator, xctrace
doesn't apply there.
We can run smth like
open -a Simulator.app --args -CurrentDeviceUDID <device id>
哈哈~,我把 Xcode 的仪器复制到 Xcode13 的 /Applications/Xcode.app/Contents/Developer/usr/bin/ ,然后运行 react-native run-ios 成功。
For me I needed to upgrade react-native using:
yarn upgrade react-native
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.