본문 바로가기

Flutter

<Flutter> Command PhaseScriptExecution failed with a nonzero exit code 오류 해결

Xcode 버전을 14.3으로 업데이트하고 앱을 배포하려고 아카이빙을 하다 계속해서

Command PhaseScriptExecution failed with a nonzero exit code

이 오류가 나와서 실패를 하는데 자세히 보니 그 아래에 다음과 같은 메시지가 있어 열어봤는데

IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.framework"
failed: No such file or directory (2) while archiving flutter app

이러한 문구를 확인할 수 있었다.

수정 방법은 다음과 같다.

Runner가 아닌 Pods에서 Targets Support Files -> Pods-Runner -> Pods-Runner-Frameworks.sh 파일을 먼저 연다.

여기에 44번째 줄을 보면

source="$(readlink "${source}")"

이 부분에 -f 를 추가해주면 된다.

source="$(readlink -f "${source}")"

그 다음 Product에서 "Clean build folder"로 정리해주고 다시 아카이빙 하면 잘 되는 것을 확인할 수 있다.