[Solved] Failed to package: Command PhaseScriptExecution failed with a nonzero exit code

Question

Asked by Siyah on December 09, 2021 (source).

I am constantly getting the following error when trying to build my Flutter app in Xcode:

Failed to package /Users/Me/yourapp/
Command PhaseScriptExecution failed with a nonzero exit code
Font subsetting is not supported in debug mode. The --tree-shake-icons flag will be ignored.

I am out of options. I tried everything, literally every single of the answer provided in previous answers.

Note:

1 - I first build the app on Windows

2 - Cloned my app on my MacBook via Github

3 - Downloaded Cocoapods

4 - Ran Flutter run

   Failed to package /Users/Me/yourapp/
   Command PhaseScriptExecution failed with a nonzero exit code

And there is the error.

Edit:

Font subsetting is not supported in debug mode. The --tree-shake-icons flag will be ignored.

Is what I get now...

How can we solve this?

Note: working on an older MacBook (2014) and my device (iPhone) is plugged in. Both the device as well as simulator are not working.

Answer

Question answered by Johan (source).

Try to do:

flutter create .

You have to do this in your main project folder. Remove any ios folder if there is one and make sure you do the command with the dot.

Should work.

It will solve it for sure. Both of your questions are related to the same topic.

FLUTTER GITHUB IOS XCODE
SHARE: