Xcode Archive fails

163 views Asked by At

If your app runs successfully on both a device and an emulator, but fails during the archiving process.

PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks

Command PhaseScriptExecution failed with a nonzero exit code

`

1

There are 1 answers

3
Lokesh On

You should search for this file in your project.

Pods-[your-project-name]-frameworks.sh (...-frameworks.sh)

Eg: Pods-sampleApp-frameworks.sh

And edit this section.

if [ -L "${source}" ]; then
  echo "Symlinked..."
  source="$(readlink "${source}")"
fi

Changed To:

if [ -L "${source}" ]; then
  echo "Symlinked..."
  source="$(readlink -f "${source}")"
fi

-f is added after readlink

enter image description here

Ref. : https://github.com/CocoaPods/CocoaPods/issues/11808