skip to Main Content

I’m getting the following error when building my project: Command PhaseScriptExecution failed with a nonzero exit code.
enter image description here

This is what I have in my [CP] Embed Pods Frameworks:
enter image description here

I’ve also done a pod deintegrate and pod install but these frameworks continue to show in red:

enter image description here

I’m on Xcode Version 12.4 and my mac has an Apple M1 chip. Any thoughts as to what I could do to resolve this error?

4

Answers


  1. Chosen as BEST ANSWER

    Clearing the Excluded Architectures solved the issue. I originally had arm64 and x86_64 excluded.

    enter image description here


  2. Did you solve your issue?
    I got the one of solutions.

    1. First of all, you have to delete the files which are red of iOS, Frameworks . They don’t exist anymore, so you shouldn’t include them to archive.
    2. then clean up your builds.
      (click Xcode -> product -> clean build folder)
    3. go to archive.
      (click Xcode -> product -> archive)

    If you don’t use M1, then you have to exclude architectures "arm64".

    That’s it.
    Hope it works.

    Login or Signup to reply.
    1. clear all files inside Library/Developer/Xcode/DerivedData/
    2. List item clean & build again from xcode
    Login or Signup to reply.
  3. if you’re using nvm make sure you don’t have another globally installed version of Node/npm.

    If you aren’t sure whether or not you have a global version, go to your bash_profile/zshrc and comment the three nvm initialization lines (export NVM_DIR="$HOME/.nvm" […]), then open a new terminal and do node –version, if it still finds something it means that you have a global version somewhere, and you can find its path with which node.

    In my case I’m using Homebrew, and I had a global version of Node that I wasn’t even aware coming from the yarn formula, I discovered it after running brew uses –installed node. I went ahead and uninstalled yarn using brew uninstall --force yarn, which automatically uninstalled its node/npm dependency, then uncommented the nvm initialization lines, and then I reinstalled yarn using nvm’s npm with npm i -g yarn, and now everything works.

    Another way, after installing node via brew install node RUN sudo ln -s /opt/homebrew/bin/node /usr/local/bin/node

    restart xcode and try to build again.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search