😭

「Command PhaseScriptExecution failed with a nonzero exit code」の解決方法

2024/03/04に公開

Xcodeのビルドエラー

Project > Archiveでアプリをビルドしたときに以下のエラーになりました。

Command PhaseScriptExecution failed with a nonzero exit code

既出の解決策でうまくいかず

こちらの記事の方法で解決したという報告をいくつか見つけましたが、自分のコードでは既に対応済みでした。

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

https://kkfactory92.com/swift-error003/

解決方法

Podsの再インストールで解決しました!
以下コマンド実行後にProject > Archiveでのエラーが解消しました。

pod deintegrate
pod install

Discussion