I am trying to create a swift script that I can use during the Build Phase in Xcode.
Attempt made so far:
- Go to Xcode > Build Phase > Add Run script
- shell: #!/usr/bin/swift sh
let x = 10
When I run I get the following error
let: =: syntax error: operand expected (error token is "=") Command PhaseScriptExecution failed with a nonzero exit code
- Could you assist me to create a build script (like
x=10, just a proof of concept)
- Is the hashbang used correct and am I supposed to use it in the shell text field in Xcode ?
- Even if I am able to execute a swift function that would really help as I have written some build phase script in swift and would like to execute it.
- I even tried on the first line of the script and still throws the same error.