Xcode 10 Command PhaseScriptExecution failed with a nonzero exit code (EXPANDED_CODE_SIGN_IDENTITY: unbound variable)

Alex Stone picture Alex Stone · Sep 8, 2018 · Viewed 33.1k times · Source

This error pops up when doing Project > Test

/Users/.../Project/Pods/Target Support Files/Pods-Target/Pods-TargetTests-frameworks.sh:
line 104: EXPANDED_CODE_SIGN_IDENTITY: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code

How do I resolve "Command PhaseScriptExecution failed with a nonzero exit code" error when trying to test a project with cocoapods?

Answer

Nuzhdin Vladimir picture Nuzhdin Vladimir · Oct 5, 2018

This helped me

sudo gem install cocoapods --pre
pod update

I've read BugReport. Problem was similar to mine and it was fixed in 1.6.0.beta.1 (2018-08-16) (changelog).

Updated(thanks to Cœur)

1.6.0 (2019-02-07) Was published

sudo gem update cocoapods

This should work now.