Xcode 13 instruments is not a developer tool or in PATH (React native)
Asked Answered
B

2

12

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.

Barrington answered 24/9, 2021 at 11:47 Comment(3)
developer.apple.com/forums/thread/690889 I created a ticket in apple developer and it seems like instruments in deprecated in Xcode 13 command line tools, I checked in utilities folder as well, it is not present.Barrington
can you put that as an answer? Since the instruments CLI has been removed, it looks like it won't be re-added.Cotten
so what is the fix?Ibbie
B
2

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

Barrington answered 4/2, 2022 at 13:20 Comment(0)
P
3

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.

Putative answered 29/9, 2021 at 15:24 Comment(0)
B
2

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

Barrington answered 4/2, 2022 at 13:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.