iOS build

PhaseScriptExecution failed with a nonzero exit code

A script inside the Xcode build failed

PhaseScriptExecution failed with a nonzero exit code. One of the project’s script phases exited with an error. This line is only the summary — the real error is printed earlier in the log.

Updated

What this error means

One of the project’s script phases exited with an error. This line is only the summary — the real error is printed earlier in the log.

Why it happens

Xcode ran a Run Script phase, often the one that copies the web build, and that script exited non-zero. This line is the summary; the cause is earlier in the log.

The message tools print

Command PhaseScriptExecution failed with a nonzero exit code

How to fix it

  1. Scroll up to the first error before this line and paste that here instead.
  2. A frequent cause is a missing web build or Node not found — run npm run build and npx cap sync ios before building.

Check a log that shows this

Paste the failing step into the build error explainer. It matches this message, and any others in the same log, in your browser. Nothing is uploaded.

Other iOS build errors

Stop signing this on a Mac

CapWrapp creates the Apple Distribution certificate from your App Store Connect API key and installs it, with the provisioning profile, on every GitHub Actions build.

  • Free to start
  • No credit card
  • Sign in with Google or GitHub