Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS App size is outrageous

I have a simple iOS App with 4 Viewcontrollers and few ressources. The Resources include a video (30mb) and images (10mb). I was expecting an app size of max. 50MB but when I archive it goes up to 107MB.

I have read that when I use Swift libraries or pods Xcode includes Swift core into my app. My question is now what should I do? 107MB is unacceptable. Even 50MB is really big but I was fine with. Is there a way to reduce the size and keep the Swift pods included? At this stage I can't even upload it.

UPDATE

Thanks to @GoRoS I have inspected and found out that libswiftCore.dylib 43MB & libswiftFoundation.dylib 5MB are the files that really increase the size. Still its strange. I have the Swift libraries at two different locations in my IPA.

  • IPA
    • iphoneos (contains Swift libs)
    • payload
      • Frameworks (contains obj-c libs and Swift)
like image 598
SaifDeen Avatar asked Mar 14 '23 08:03

SaifDeen


2 Answers

SaifDeen, I would recommend to inspect your IPA file by yourself and you will discover why your app is that big ;)

For that just remember that an IPA is a simple ZIP file:

unzip -lv /path/to/your/app.ipa

Check this reference

Update:

Disabling bitcode will decrease your IPA size. However, as far as I know, even though you have bitcode enabled once your app is in the store Apple makes some optimizations to the app before the user downloads it. The result of that should be a smaller file size.

like image 80
GoRoS Avatar answered Mar 23 '23 20:03

GoRoS


I was having a similar issue with my app and the only way that I was able to see the final size of the app is not when archiving, is once the app is on Apple servers. The best way to test this is archiving and upload it to iTunes Connect and then installing it with TestFlight.

In my case, at first was around 90 MB and then when installing with TestFlight was only 39 MB.

Hope this helps

like image 43
estemendoza Avatar answered Mar 23 '23 20:03

estemendoza