XCode 14.3 Command PhaseScriptExecution failed with a nonzero exit code

4.4k Views Asked by At

I am getting Command PhaseScriptExecution failed with a nonzero exit code after updating to XCode 14.3. Earlier it was working fine. Tried multiple solutions still result is same.

3

There are 3 best solutions below

1
On BEST ANSWER

Workaround is to update all the generated ...-frameworks.sh files to add the -f flag to the call to readlink. In other words, need to replace:

source="$(readlink "${source}")"

with

source="$(readlink -f "${source}")"

Seems this is CocoaPods issue...

0
On

I'm really not sure how I got this to work in the end but it was a combination of these things:

  • Downgrading to Xcode 14.2
  • Upgrading to Cocoapods 1.12.1
  • Updating Flutter to 3.10.5
  • Removing Flutter Version Management (FVM)
  • Updating all dependencies

Honestly, I think FVM was the final problem, I'm really not sure though. Just glad that after 3-4 hours of solid trial and error my project now builds again.

0
On

I had a similar problem after the update. Updating Cocoapods and the CryptoSwift helped in my case. Try to update everything as well.