Error while building: "Command PhaseScriptExecution failed with a nonzero exit code"

After downloading the sample projects, I tried to run them. But the build failed with a “Command PhaseScriptExecution failed with a nonzero exit code” error message.

The steps described in this post solved it. (just ignore steps 7, 14 and 15)…

@gcg Do you still have issues with this?

No: solution at the bottom of the post…

I have this problem using Xcode 11.4.1. The build log indicates that it is a ‘Permission denied’ problem while running Pods-CoffeeQuest.frameworks.sh.

I have no experience of Cocoapods and am not confident in following the steps outlined by @gcg. Effectively, I am stuck.

Assuming this is an Xcode compatibility problem, are there any plans to release a version of the project that works against current Xcode versions?

If you never used CocoaPods before you might want to take a look at the tutorial that’s suggested in the book.

Basically all you need to do is install CocoaPods and after that follow the instructions found here: Review Late answers - Stack Overflow.

To install CocoaPods enter the following command in Terminal:

sudo gem install cocoapods

When the installation is done, enter this command to finalize the setup:

pod setup --verbose

@lesormonde Do you still have issues with this?

open terminal and enter command chmod a+x
this fixed my issue as I was getting the same error @lesormonde @gcg

@skiwalker Thank you for sharing your solution - much appreciated!

In new versions of Xcode you need to make the script executable. Open terminal and execute this command:

chmod a+x "/Users/…/Pods/Target Support Files/Pods-CoffeeQuest/Pods-CoffeeQuest-frameworks.sh

Best,

I am also getting same issue but I haven’t utilised any dependency files with CocoaPods. Can some one help me out.

  • What went wrong:
    Task ‘embedAndSignAppleFrameworkForXcode’ not found in project ‘:shared’.

The identical problem arose and was resolved by utilizing the following link (Unity2019.4.19f1) as a reference and executing a command to clear the contents of “process_symbols.sh” prior to archiving:
cp /dev/null ${xcode_project_path}/process_symbols.sh
https://ustechportal.com/command-phasescriptexecution-failed-with-a-nonzero-exit-code/