0

Due to character limits in the title, allow me to elaborate on what is happening.

I have an application that builds with no warnings & errors while using Xcode 10.2.1, but I would like to test it in the latest Xcode 11 beta.

However, it produces an error during the build process, yet oddly enough, the app properly launches and is usable on a simulator.

The error:

xcrun: error: unable to find utility "scntool", not a developer tool or in PATH

Initially, I thought it was possible that the spaces in my app's name were a problem, so I quickly renamed it to use _ in place of the spaces, but that did not work.

Rebuilding the app after I removed the spaces also shows the following warning:

copySceneKitAssets: warning: Failed to copy SceneKit assests because scntool failed to process the following resources: /Users/someidiot/Library/Developer/Xcode/DerivedData/Build/MyAmazingApp/Products/Debug-iphonesimulator/My_Amazing_App.app/art.scnassets/Game.scn

And yes, the file is there:

enter image description here

Out of curiosity, I purged my derived data in case something was causing problems there.

rm -rf ~/Library/Developer/Xcode/DerivedData

However, the same scenario as before... warnings & errors upon building, but the app successfully launches on the simulator.

enter image description here

My concern here is that if something is genuinely wrong, I'd like to fix it before it becomes an issue, but at the same time, the app does launch successfully.

Unfortunately, I do not have access to an iOS 13 device at this time to test on hardware.

CodeBender
  • 35,668
  • 12
  • 125
  • 132
  • Did you install the Developer Tools? What does `xcode-select -p` tell you? – matt Jul 27 '19 at 23:41
  • @matt Yes, I did & did perform a reboot as well. Response to `xcode-select -p` is `/Applications/Xcode.app/Contents/Developer` – CodeBender Jul 28 '19 at 01:11
  • @matt Btw thanks, did steer me to the problem. Made the assumption that it would install tools to the proper path... – CodeBender Jul 28 '19 at 01:40
  • "Response to xcode-select -p is /Applications/Xcode.app/Contents/Developer" Yup, well, that's the problem. – matt Jul 28 '19 at 02:23

1 Answers1

5

After any new Xcode installation, or even when switching between versions of Xcode, always go into Xcode's Preferences and, under Locations, adjust the Command Line Tools pop-up menu to point to the version of Xcode you are using.

Otherwise, something like xcrun, which means "run a tool inside Xcode", will be looking in the wrong Xcode.

matt
  • 515,959
  • 87
  • 875
  • 1,141