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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With