I am trying to add a new build phase and run a .swift
build script to process files.
When I try:
v Run Script
Shell /usr/bin/swift
# Type a script or drag a script file from your workspace to insert its path.
"${PROJECT_DIR}/BuildScript.swift"
Shell /bin/sh
/usr/bin/swift "${PROJECT_DIR}/BuildScript.swift"
In both cases, I get the following errors:
/<unknown>
/<unknown>:1:1 using sysroot for 'iPhoneSimulator' but targeting 'MacOSX'
/<unknown>:1:1 unable to load standard library for target 'arm64-apple-macosx13.0'
So it turns out this is a better way to reference my file:
I found a AF Swift Tutorial discussing it.
I wrote a medium article walking through the steps.