Command PhaseScriptExecution failed with a nonzero exit code - using CocoaPods

Viewed 11059

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?

2 Answers

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

enter image description here

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.

Related