Command PhaseScriptExecution failed with a nonzero exit code

I am working on a Unity IOS game. I keep getting this reoccurring issue. I downloaded XCODE via the app store, so it automatically is in my applications folder

Here is the log:
Showing Recent Messages WorkingDir: /Users/parkerbrandt/Library/Developer/Xcode/DerivedData/Unity-iPhone-gsxoxmhunhavroeddecygwafmdgn/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/artifacts/arm64/buildstate

ExitCode: 4 Duration: 0s13ms

ExitCode: 1 Duration: 0s1ms

Build failed with 0 successful nodes and 0 failed ones

Error: Internal build system error. BuildProgram exited with code 1.

Unity.IL2CPP.Bee.BuildLogic.ToolchainNotFoundException: IL2CPP C++ code builder is unable to build C++ code. In order to build C++ code for Mac, you must have Xcode installed.

Building for Apple Silicon requires Xcode 9.4 and Mac 10.12 SDK.

Xcode needs to be installed in the /Applications directory and have a name matching Xcode*.app. Or be selected using xcode-select.

It's also possible to use /Library/Developer/CommandLineTools if those match the listed requirements.

More information and installation instructions can be found here:

https://developer.apple.com/support/xcode/

Specific Xcode versions can be downloaded here:

https://developer.apple.com/download/more/

Unable to detect any compatible iPhoneOS SDK!

at Unity.IL2CPP.Bee.BuildLogic.iOS.iOSBuildLogic.GetCompatibleXcodeInstallation(Architecture architecture, Version xcodeMinVersion, Version platformSdkMinVersion, Identifier platformSdkIdentifier, XcodePlatformSdk& compatiblePlatformSdk, XcodeInstallation& compatibleXcodeInstallation)

at Unity.IL2CPP.Bee.BuildLogic.iOS.iOSBuildLogic.UserAvailableToolchainFor(Architecture architecture, NPath toolChainPath, NPath sysRootPath)

at Unity.IL2CPP.Bee.IL2CPPExeCompileCppBuildProgram.BuildProgram.Main(String[] args, String currentDirectory)

at Unity.IL2CPP.Building.InProcessBuildProgram.StartImpl(String workingDirectory, String[] arguments) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.Building/InProcessBuildProgram.cs:line 51

Error: Unity.IL2CPP.Building.BuilderFailedException: Build failed with 0 successful nodes and 0 failed ones

Error: Internal build system error. BuildProgram exited with code 1.

Unity.IL2CPP.Bee.BuildLogic.ToolchainNotFoundException: IL2CPP C++ code builder is unable to build C++ code. In order to build C++ code for Mac, you must have Xcode installed.

Building for Apple Silicon requires Xcode 9.4 and Mac 10.12 SDK.

Xcode needs to be installed in the /Applications directory and have a name matching Xcode*.app. Or be selected using xcode-select.

It's also possible to use /Library/Developer/CommandLineTools if those match the listed requirements.

More information and installation instructions can be found here:

https://developer.apple.com/support/xcode/

Specific Xcode versions can be downloaded here:

https://developer.apple.com/download/more/

Unable to detect any compatible iPhoneOS SDK!

at Unity.IL2CPP.Bee.BuildLogic.iOS.iOSBuildLogic.GetCompatibleXcodeInstallation(Architecture architecture, Version xcodeMinVersion, Version platformSdkMinVersion, Identifier platformSdkIdentifier, XcodePlatformSdk& compatiblePlatformSdk, XcodeInstallation& compatibleXcodeInstallation)

at Unity.IL2CPP.Bee.BuildLogic.iOS.iOSBuildLogic.UserAvailableToolchainFor(Architecture architecture, NPath toolChainPath, NPath sysRootPath)

at Unity.IL2CPP.Bee.IL2CPPExeCompileCppBuildProgram.BuildProgram.Main(String[] args, String currentDirectory)

at Unity.IL2CPP.Building.InProcessBuildProgram.StartImpl(String workingDirectory, String[] arguments) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.Building/InProcessBuildProgram.cs:line 51

at il2cpp.Program.DoRun(TinyProfiler2 tinyProfiler, String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions) in /Users/bokken/build/output/unity/il2cpp/il2cpp/Program.cs:line 319

Command PhaseScriptExecution failed with a nonzero exit code

Im also experiencing this after my mac updated Xcode to 15.1

Having the same problem on XCode 15.2

Command PhaseScriptExecution failed with a nonzero exit code
 
 
Q