Home > Back-end >  why the xcode build parameter --no-tree-shake-icons did not work
why the xcode build parameter --no-tree-shake-icons did not work

Time:07-08

I am using xcode(v13.4.1) to build a flutter app, when I first build the app, shows error like this:

This application cannot tree shake icons fonts. It has non-constant instances of IconData at the following locations:

and I found the answer from enter image description here

but did not work, am I missing something? what should I do to fixed this problem?

CodePudding user response:

You should be able to set a flag within the User-defined variables in Xcode in order to disable tree shaking icons.

  1. Select the top most Runner in the left pane.
  2. Press Build Settings and scroll all the way down.
  3. Add TREE_SHAKE_ICONS with a value of false as in the image below.

enter image description here

I hope this helps!

  • Related