Swift.org issue with open source swift project. Error: xcrun: error: unable to find utility "launch-with-toolchain", not a developer tool or in PATH
Asked Answered
B

1

18

I am trying to Start Xcode with the custom toolchain and to be enabled to use the open source version of Swift.

Steps are taken from Swift.org

And I receive this error:

xcrun: error: unable to find utility "launch-with-toolchain", not a developer tool or in PATH
Broom answered 4/12, 2015 at 13:9 Comment(5)
With what parameters did you call xcrun? Do you have the latest Xcode 7.2 installed on El Capitan?Prophet
Yes i am using latest El Capitan and two Xcode 7.2 and Xcode 6.4Broom
FWIW, it doesn't work for me either, xcrun launch-with-toolchain /Library/Developer/Toolchains/swift-latest.xctoolchain produces the same error.Reeve
@EricD.: Would you mind to check if the solution works for you as well?Prophet
@MartinR Done. It works now. Thanks!Reeve
P
38

The open source Swift toolchain from https://swift.org/download/#apple-platforms requires the latest Xcode 7.2 (currently: beta 4).

The location of the developer directory used by xcrun and other build tools must be set to this Xcode 7.2. This can be done from the command-line with

sudo xcode-select -s /path/to/Xcode7.2-beta.app/Contents/Developer

or in the Xcode "Locations" preferences:

enter image description here

Prophet answered 4/12, 2015 at 14:15 Comment(2)
thx for quick response problem was in the issue that you describe. Thx for that!Broom
This fixed my issue, Why it's not atomically selects the latest or at least one of them?Enriquetaenriquez

© 2022 - 2024 — McMap. All rights reserved.