Search code examples
iosxcodeflutter

How to speed up flutter clean when having 20 flavors?


Our app have many flavors (around 20).

When running flutter clean, flutter run internally the following command for each flavors which took some times :

/usr/bin/arch -arm64e xcrun xcodebuild -workspace /Users/my_user/Documents/projects/flutter-app/ios/Runner.xcworkspace -scheme client_one clean
...
/usr/bin/arch -arm64e xcrun xcodebuild -workspace /Users/my_user/Documents/projects/flutter-app/ios/Runner.xcworkspace -scheme client_two clean

Flutter clean can took more than 10min.

Do you have any idea ?

My device :

MacBook Pro M1

Flutter 3.0.5 / 3.3.3


Solution

  • Flutter released my PR about this issue.

    You can now use :

    fvm flutter clean --scheme your_scheme // Your flavor