Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 455
Alex Stone Avatar asked Sep 08 '18 11:09

Alex Stone


6 Answers

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.

like image 85
Nuzhdin Vladimir Avatar answered Nov 11 '22 21:11

Nuzhdin Vladimir


I have facing the same issue, i believe this issue have something link to keychain access too (code signing problem), I go to keychain access unlock the login then lock it again fixed this issue. After uploading toOSMojave and Xcode 10 keychain need to reverify the password. (how i find this? while facing same issue and trying all available option, i think to generate certificate again, but while generating private key i found keychain login user name and password is wrong type of message- i lock and unlock again solved my problem). Note this process required your login pass phare.

How to fix:- short tip

Go to keychain access -> right click on login -> lock & unlock again 
-> clear Xcode project and make build again.
like image 41
M Abubaker Majeed Avatar answered Nov 11 '22 22:11

M Abubaker Majeed


Some Framework or SDK require Code Signing.

I done code signing and resolved the similar problem for me. enter image description here

like image 37
Ashvin A Avatar answered Nov 11 '22 23:11

Ashvin A


EXPANDED_CODE_SIGN_IDENTITY: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code

I had the same problem after updating BuildSettings and Podfile

I just restarted Xcode and opened a workspace - .xcworkspace (not project - .xcodeproj)

[Workspace vs Project]

like image 2
yoAlex5 Avatar answered Nov 11 '22 22:11

yoAlex5


Go to pod folder and change the file as executable file. It works for me.

chmod +x filename

filename => your file name like "swiftlint"

like image 1
Balaji G Avatar answered Nov 11 '22 22:11

Balaji G


On the top of - Pods-yourProjectName-frameworks.sh

export EXPANDED_CODE_SIGN_IDENTITY=""
export EXPANDED_CODE_SIGN_IDENTITY_NAME=""
export EXPANDED_PROVISIONING_PROFILE=""

this is an issue with pod update.

like image 1
Venu Gopal Tewari Avatar answered Nov 11 '22 23:11

Venu Gopal Tewari