I recently upgraded to xcode13, before which react native app was working fine for long time. However, after switching when I run in iOS, I am getting error "instruments is not a developer tool or in PATH" on command "xcrun instruments". I tried following commands (all with Xcode in quit status)
sudo xcode-select -r
it reset the xcode select path to
/Applications/Xcode.app/Contents/Developer
then I quit command line reopened and tried
xcrun instruments
got same error again, so tried switching
sudo xcode-select -s /Library/Developer/CommandLineTools
quit command line and tried again, still no success. each time i verified path change using command
sudo xcode-select -p
I opened instruments app using cmd+space and could see version as 13, same as Xcode.
That means matching instruments app(tool) exists but somehow xcrun is unable to find it which results in build failure.
FYI my react native version is 0.64.0. I saw couple of solutions like comment out flipper (which was not in my pod file though!) and add swift to library path in project.pbxproj, both solutions could not be applied.
Any suggestions would help.
2
Answers
The solution is to upgrade to 0.64 incase creating RN builds with Xcode 13 as Instruments have been replaced with xctrace only in 0.64's RN cli 5.0.1 (upgrade RN Cli as well), reference : RN Github solution comment
I’ve been getting the same error no matter what I’ve tried. I think there might be an error on setting the command line tools path with the Xcode version 13. So deleting XCode 13 (How to uninstall XCode) and reinstalling 12.5.1.(XCode12.5.1) solved the problem for me temporarily.