Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reduce .ipa file size of IOS build in Flutter?

I have created an IOS build for flutter for the app store and generated its archive which resulted in a huge 90 MB .ipa file. I searched a lot on the net that how can I reduce IPA file size but didn't got any suitable answers. I tried several methods like :

  1. flutter clean command in project terminal and then used flutter build ios command but it didn't reduce the size.
  2. I checked the option for Strip Swift Symbols but it only reduced 1 or 2 MB of size.

Does switching my Xcode project from Swift to Objective-C will reduce my .ipa file size? I am using several third party libraries in my Flutter app, are they responsible for this huge size?

  cupertino_icons: ^0.1.2
  gradient_app_bar: ^0.1.3
  url_launcher: ^5.1.2
  easy_localization: ^1.3.0+1
  http: ^0.12.0+2
  connectivity: ^0.4.4
  fluttertoast: ^3.1.3
  carousel_slider: ^1.3.0
  image_picker: ^0.6.1+4
  flutter_barcode_scanner: ^0.1.5+1
like image 559
ahd786 Avatar asked Sep 23 '19 13:09

ahd786


2 Answers

Did you try using --split-debug-info= at the end of your build command?

like image 149
Sean Avatar answered Nov 02 '22 15:11

Sean


As of Flutter 1.17

you will find a 20% app size reduction,

Also Obfuscating you code will decrease your app size https://flutter.dev/docs/deployment/obfuscate

Tip! in flutter 1.17 they improves app performance by 50% on iOS

like image 29
Ramy Aly Avatar answered Nov 02 '22 14:11

Ramy Aly