Today XCode just upgraded to 15, now getting “phasescriptexecution failed with a nonzero exit code”. Tried many fixes that I can find online, nothing seems to work. New empty project from Unity also result in this error. Existing XCode Swift projects build with no issues.
Please help. I was like 1 hour away from finishing my app… This was half 6-8 hours ago. Googleing since with no luck.
Apparently there is a change in Xcode 15: https://issuetracker.unity3d.com/issues/building-projects-with-il2cpp-scripting-backend-for-apple-platforms-fails-with-xcode-15-dot-0b6-or-newer
I’m getting this too, unable to build anything for iOS currently. Putting -ld64 or -ld_classic in 'Other Linker Flag’s also doesn’t help.
EDIT: Downloading XCode Beta 15.1 helped
Hi everyone keeps saying ID64 but where is this located? Is it in unity or xcode and where is it located once i go into the build settings? Im in unity and do not see this option
It’s located in Xcode, under Build Settings => Other Linker Flags
I still have the same problems in Xcode Beta 15.3, even if the flag has been set. How did you get this working?
In my case it was related to Unity Cloud Diagnostics, as described here:
Guys did you found a way to solve the problem: "
phasescriptexecution failed with a nonzero exit code"??
I fix this by updating my Unity from 2022.3 to 2022.3.15f1
I tried out a clean build and everything worked
This worked for me as well.
I have same error:
Command PhaseScriptExecution failed with a nonzero exit code
Unity 2022.2.5, XCode 15.2. Unity build successfull, but XCode faile afte 1-2 ceconds.
Can anyone help?
@Roman_34 you should update to the latest Unity LTS, that worked for me.
@kantagara what does your pod file look like?
i am getting this error in 2024
same
trying everything will get back in a sec
I get this error (PhaseScriptExecution failed with a nonzero exit code
) when trying to add Apple GameKit to my project.
It is very easy to reproduce:
- Create a new project, set platform to iOS
- Follow the steps from the quick start guide in the official repo GitHub - apple/unityplugins
- Add Apple.Core and Apple.GameKit
- Build & Run (opens Xcode, fix the signing)
- Sometimes it works, build again in Unity, for me it will always fail the 2nd time
In my main project if I remove Apple.Core and Apple.GameKit and do a clean build, it works, however I would like to have GameCenter available in my game.
- I updated Unity to the latest LTS 2022.3.41f1
- I updated my Mac (Sonoma 14.6.1)
- I reinstalled Xcode (15.4)
- I removed my Temp and Library folder multiple times
- I rebuild the Apple plugins multiple times
- I tried the
-ld64
and the suggested-ld_classic
flag
No luck, any other ideas on how to fix it?
Edit: Also tried several older versions of the Apple Plugins