Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you set Flutter build options in Xcode

I need to set the following flutter build option in the Xcode GUI:

--no-tree-shake-icons

Without this, I get an error when building an Archive for distribution (which I would like ignored).

I'm guessing that somewhere buried in the Xcode settings is the "flutter build ..." command, but cannot find it.

like image 716
Nick Wright Avatar asked Nov 18 '25 23:11

Nick Wright


1 Answers

I have found the answer!

In Xcode, open the Runner/Flutter/Generated.xcconfig file. In there you should find the following:

TREE_SHAKE_ICONS=true

Set it to false and re-run Archive. If its missing, just add it.

I think this file gets generated by Android Studio when you build your flutter app, so you may need to change it each time you need to do a release. But it works!

like image 75
Nick Wright Avatar answered Nov 20 '25 14:11

Nick Wright



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!