8

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?

1

4 Answers 4

16

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

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

After clearing I got this error: Target Integrity (Xcode): The linked framework 'Pods_Runner.framework' is missing one or more architectures required by this target: arm64.
@MKarimi Add arm64 x86_64 in. Architectures>Excluded Architectures>Debug> Any iOS Simulator SDK : arm64 x86_64
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.

2 Comments

Simply running Clean Build Folders seems to have solved it for me. Mind was specificly to do with FirebaseAnalytics. Thanx. BTW, I'm not sure what you meant by #3. Can you clarify your answer?
I mean, just click 'archive' button in your Xcode as I mentioned #2.
1
  1. clear all files inside Library/Developer/Xcode/DerivedData/
  2. List item clean & build again from xcode

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.