Flutter build IOS error IconTreeShakerException: Font subsetting failed with exit code -9
Asked Answered
G

2

6

Before that I still build IOS normally with the command: flutter build ipa. Until I upgraded to Flutter 3.3.10. It suddenly throws an exception and I can't build IOS.

Failed to build iOS app
Error (Xcode): Target release_ios_bundle_flutter_assets failed: 
IconTreeShakerException: Font subsetting failed with exit code -9.


Encountered error while archiving for device.
Groceryman answered 22/6, 2023 at 16:27 Comment(0)
G
7

Yes as @Janis awnser as hot fix. Or use my way, go to System Preferences -> Security & Privacy -> Allow Font-sub

enter image description here

Groceryman answered 26/6, 2023 at 2:17 Comment(0)
L
5

I just encountered the same issue. Maybe it is related to some IconData not being declared as const, but I didn't find anything like that in my project, so for now I append --no-tree-shake-icons to my release build command, maybe that works for you too.

Landloper answered 23/6, 2023 at 10:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.