Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Runner.app size is about 400mb. How to reduce it?

Tags:

ios

swift

flutter

I'm developing flutter app using flutter_tts library which is written on swift, so I have to use swift as build language for ios otherwise it won't work. Release build size for android is about 20-30mb, but for ios is almost 400 mb. This is not because of assets. I read about this problem and a lot of people said that this is because swift, so I created a hello world app and compared release build sizes: objc: ~20mb and swift: ~65mb. Unfortunately, I have no choice. Now Flutter build for ios is 10-15 times bigger than for android. 400 mb – it seems like a joke, obviously it's inappropriate. Even if I convert Runner.app to ipa file, the size will be about 200mb. This is too large size to download app from AppStore.

Am I doing something wrong? Could someone help me? Any help is appreciated!

like image 837
Евгений Стёпин Avatar asked Oct 19 '19 00:10

Евгений Стёпин


1 Answers

I had exactly the same problem (Runner.app ~ 360 mb).

First check your Flutter SDK version:

flutter --version

You may not be using the latest version, or you’re in an unstable channel. Switch to the stable channel and update the Flutter SDK:

flutter channel stable
flutter upgrade --force

Build a project:

flutter clean
flutter build ios --release

Version:

Flutter 1.9.1+hotfix.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 68587a0916 (6 weeks ago) • 2019-09-13 19:46:58 -0700
Engine • revision b863200c37
Tools • Dart 2.5.0

Build size decreased to 54.5 MB and .ipa file to 21.8 MB.

like image 56
Holofox Avatar answered Nov 15 '22 04:11

Holofox