2

I want to run a Swift script as part of my Xcode project build but I'm getting many errors when I add it. (Screenshot showing some of the errors is attached.) Am I missing something?

My run script build phase looks like this:

(Shell: /bin/sh)
swift path/to/my/script

errors

1 Answer 1

1

You have to include full path to swift which would be for current release /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift path/to/your/script

Or for any beta version of Xcode it would be

${PATH_TO_XCODE_BETA_DOT_APP}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift path/to/your/script

Or you my just write you script directly in run script build phase like so :

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.