Command PhaseScriptExecution failed with a nonzero exit code

「Command PhaseScriptExecution failed with a nonzero exit code」のアイキャッチ画像

まずはこちらを追加

podfileの末尾にこちらを追加

# arm64を追加する際にこちらを追加
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
    end
  end
end

次はpodを更新

pod install

その後にビルドを実行したら下記のエラーが発生

'Flutter/Flutter.h' file not found

次はこちらを実行

rm ios/Flutter/Flutter.podspec
flutter clean

目次
  1. 参考記事

参考記事

Xcode 12, building for iOS Simulator, but linking in object file built for iOS, file for architecture arm64

Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

error: ‘Flutter/Flutter.h’ file not found when flutter run on iOS