I have spent the last few hours trying to figure out ways to reduce the size of the app that I am working on.
I have managed to reduce the size of the cooked data that gets in the final build by making a blacklist and blocking all the tutorial assets, engine assets, etc that are not used. Not a very intuitive solution, but good enough.
What I am really struggling with is reducing the size of the executable, Its current size is 80MB on iOS, in a shipping build.
I have tried disabling plugins in the editor and adding some compile exclusions in DefaultEngine.ini similar to TappyChicken, but there was very little change to the size (less than a MB if any).
I am currently only using the editor but the actual project is a C++ project and it has a couple of custom classes.
Is there a way for me to know what goes inside the executable, which will possibly allow me to exclude things that take a lot of space? Aside from that what are common ways to reduce the executable size on iOS?
It seems like you have been following along with the documentation we have on the [iOS Packaged Game Size][1] topic. There are some other steps you can take in order to reduce the overall size of your packaged project, located in the Project Settings within the Packaging section. In the image below, I have highlighted all the options I believe will help reduce the overall size of you project, but let me know if you are still struggling.
As a note, in the last section on the image, you can even specify asset directories to cook, package, or copy. I have also provided some more documentation on Cooking and Packaging your projects.
I have tried playing around with those options, but for the sake of sanity I went through them again and replicated the options in the image. Sadly this only seems to affect the size of the cooked data, not the size of the binary, which is still 80MB.
I understand that for iOS two versions of the executable are required, which doubles the size of the binary, but it is still extremely large. What it looks like to me is that unused code doesn’t get stripped out of the final executable.
Would you happen to be able to identify which code that is unused, which is getting added to your final packaged build?
Looking at the Tappy Chicken example, everything you are saying is mentioned in the documentation. It mentions that we do not compress the executable since it is encrypted when uploaded to the App Store and will not compress at all there.
I’m also having this issue.
to put it simply the documentation is wrong as it’s now out of date.
My executable size is not the 25.5 MB mentioned in the docs, but the same as panosg at the 80mb mark. Once all the engine content is added the ipa hits the 90mb mark.
This image is a breakdown of the filesize compliments of 7zip:
NOTE: I’m building with support for ARMv7 and ARM64 with version 4.9 of the engine.
EDIT: I’ve been posting in the question [here][2] as well.
EDIT2: After messing around with the BuildSettings flags I’ve managed to reduce the executable size down to about the 57mb mark. Much better, but still not around the 25mb mentioned in the docs. (which is for version 4.0.1 btw…) Could the docs be updated to reflect the actual size of a UE4 iOS game?
Sadly I am not familiar with how Unreal does things under the hood, but I can do some speculation.
I took a look in Engine/Binaries/IOS and among the libraries there is UE4-Engine-IOS-Shipping.a which is about 85MB in size. In the same folder the binary (UE4Game-IOS-Shipping) is about 83MB and stripping it doesn’t make it any smaller, which means that it is stripped already.
I believe that Engine-IOS-Shipping.a is the module that gets pulled in and inflates the executable. I have no idea how things work in Unreal but I assume that when a module is used, all its parts are getting referenced, which would explain stripping having little effect to the executable size.
Thank you for providing me with as much insight into the issue that you can provide. I will take this information and see if I can find some more information on the topic. If I cannot seem to find a definite answer, I will return in any condition with a report on my findings.
Hello,
I’ve run into the same problem. I’m currently using 4.10.1 which has the armv7s building disabled by default, but my executable size is still over 80 Mb. I’ve tried all the solutions listed here and in similar threads and got at best ~3 Mb size reduction.
It there anything else that can be done to push the executable file’s size under 80?
Take a look at the information FacePalm.exe provided in another post which will explain why going below the 80 MB is not expected.
“Since the blogpost, UE4 has gone through multiple versions (which added a bunch of features) and the appstore submission requirements have changed. Don’t expect to get the 33mb mentioned as it’s now outdated.”
Just an updated note for anyone else overly worried about this - I was rushing around trying to find ways to reduce the 80MB executable size (because I was struggling to get my .ipa below 100MB). I did most of the practical stuff mentioned in these threads to get my cooked data size down (without rebuilding any code) and although my distro shipping .ipa is now 106.8MB (with 80MB executable), once it’s uploaded to ITC/Testflight it’s only 69.7MB. So there must be some executable compression happening on their end now? Anyways, load off my mind…
In your experience, would it be safe (or not) to assume that Apple will compress and publish your submitted app size and reduce it by an additional 30%(ish)?
What is the file size limit for AppStore submission?
Does it apply to your ‘submitted’ file size or their ‘compressed’ file size?
I thought the limit was 100MB, but after downloading “Unreal Match3” from the appstore it was 130MB.
Perhaps Unreal Match3 is constrained to ‘WiFi downloads only’ because it exceeds the 100MB cellular download file size limit?
Inside the ipa there should be a file with no extension which is the same name as your game, this is the binary/exe.
And no, it is NOT safe to assume they will compress your app by an additional 30%.
Sometimes their process will shrink your ipa, other times you could actually see an increase. And testflight is only a guide, as an actually published app’s size can differ from what you see on testflight.
You can however look at ‘App Thinning’ which was introduced in iOS 9.0 as an extra step of shrinking your ipa.
I’m not sure if Epic support it however.
Inside the ipa there should be a file with no extension which is the
same name as your game, this is the binary/exe.
Oh! I had no idea that was the case. I normally just double click the ipa
and it launches iTunes. I had to do a quick search and found you could
view inside the ipa by adding a .zip extention and double clicking it.
Thanks for that tip!
Anyway, inside the ipa package for the TappyChicken project there was no file with the same name. There is, however, a file called UE4Game which is 84,371 KB. Presumably that is the tappy chicken exe?
And no, it is NOT safe to assume they will compress your app by an additional 30%.
■■■■! ok.
So I still have work to do reducing the size.
Currently tappy chicken ipa is 92MB after using the blacklist method,
but I can’t get it down any further yet. I still need to go through the
painful process of disabling each and every plugin to see if any make a difference. I can’t find and reference to what was excluded for TappyChicken
(or how the AppStore side is 67MB) so it is still trial and error.
Sometimes their process will shrink your ipa, other times you
could actually see an increase.
Ok, thanks.
You can however look at ‘App Thinning’ which was introduced in iOS 9.0 as an extra step of shrinking your ipa. I’m not sure if Epic support it however.
Unfortunately I’m trying to target min iOS 7.
Thanks FacePalm! Very insightful info (albeit depressing, lol).
…and so continues the question for the magic fairy dust that Epic used to
create a 67MB TappyChicken app size.