Download

How to reduce iOS app size?

I’ve created a simple game for mobile and right now, with very minimal art and blueprints, my .ipa file is 87mb. Are there any ways to to decrease the size of the app? I’m hoping to be able to reduce the size of my app to around 40-60mb.

I’ve seen a couple of other threads and answerhub questions on this topic, but none of the ways seem too effective or official. As of 4.8, is there anything that can be done to solve this issue?

Hi namcap,

There is new documentation in the works for mobile, and one of the main focuses is how to reduce package size. Unfortunately, I can’t give you any kind of time frame as to when it will be available, but it is coming. For now, the unofficial ways that others have posted are still your best bet if they’ve been successful for other users.

Hi wittlief, thanks for the response and the information.

Do you have any tips at the moment that I’d be able to use to reduce the size of my app, because right now it seems unnecessarily large (125mb in iTunes). I removed Slate/Fonts and Slate/Common from my packaged build, which helped decrease the size of my app by about 7mb. Are there any other (possibly larger) parts of UE4 that I can remove from my game that would decrease the size of my app or just any other ways to right now to reduce the size? I feel as though I am using a very tiny portion of UE4 (my game is a 2D puzzle game) but I believe that UE4 packages games with a lot more of the engine. I’ve tried some of the ways that other people have mentioned in the forums/AnswerHub, but most of those seem for code-based projects or for Android apk/obb files. Thanks for any help!

have you tried to rename the *.ipa into *.zip, and open it…then do some spring cleaning :wink: not always what is there is useful!

-m

I have, but I’m not entirely sure what is safe to delete. There is some obvious stuff that I can remove, but others I’m scared to take out just in case they have an effect on something else.

A couple of the things I removed were Slate/Fonts and all of the different UE4 icons/splash screens that I didn’t replace/don’t need.

Looking through my packaged game, it seems as though the largest contributors to my app size are within cookeddata/engine, specifically the “content” folder. Folders such as “enginedebugmaterials” and “enginefonts” are some of the largest and seem safe to remove from my packaged game. Would you know if removing these from my packaged game will cause issues? Or do you know of any other content that could be removed?

I feel as though if there were a list of such content that could be safely removed, this would help many people out, since I’ve seen others have this issue of large final app sizes.

I don’t have a specific list. But I keep removing stuff upon previous experience with other game. But not always the best thing to do, but as long as you have a strong testing round, then it is a matter of time :slight_smile: and remember the lowest file could make differences. But in general deleting is the only method I’m using from outside Epic’s documentation. Otherwise I compress the file with any zipping app, and then rename it to *.ipa, some times it save you few MBs.

-m

I compressed game with better compression, it reduced size from 108mb to 40mb. But then Apple informed me that app will be 104mb on app store. So they use some crappy compression and insist on it.
There are many engine textures that waste about 20-30mb total, it should be safe to remove them. But even with them removed we have about 30-40mb for our game content, that is bit low.

It is annoying that we cannot use a better compression for our game when it is published to the App Store. It seems as though my best bet would be deleting files from Payload/UE4Game.app/cookeddata/engine/content and using some trial and error to see what is acceptable to delete.

I have read the following documentation, but isn’t there any other way to disable slate in mac?
https://docs.unrealengine.com/latest/INT/Platforms/iOS/PackagedGameSize/index.html

Indeed my Android project achieved the size of 75 MB only by removing some folders on slate’s path, but I have no idea how to do it in mac (Not even know if it is possible…)… the ipa is now with the size of 120MB and I can’t convert it to C++ Project…

There is a whole load of assets in the Engine/Content folder inside my IPA that I’m pretty sure my game will never access in a shipping build, like:

  • The entire “enginedebugmaterials” folder (23MBs)
  • The materials “worldgridmaterial” and “defaultmaterial” (over 13MBs)
  • Three massive slate fonts called “lastresort.ttf”, “nnumgothic.ttf” and “droidsansfallback.ttf” (13MBs)

That’s 49MBs of unused assets already. No to mention a bunch of editor-only Slate icons and images and even editor tutorial assets (!). There’s got to be a way to change the packaging/cooking process so these are not included.

I did some quick digging and seems the bloat is caused by various different reasons. Some (like EngineDebugMaterials) are caused by editor-only packages being listed at BaseEngine.ini, which causes them to always be loaded (and coocked), even in shipping builds. There are some editor-only assets which are also referenced in FAssetReference properties here and there which are not wrapped in #if WITH_EDITOR macros, but which are only used inside GIsEditor checks during runtime. It is possible to prevent these assets from being cooked by overriding their config entries in platform-specific config files. I’ll do some tests and report back.

Another problem seems to be some assets which are only referenced in *Editor configs and are still being cooked for shipping builds for some reason, which seems to be the case for the tutorial assets. This seems like a bug to me.

Are you talking about blacklist files? This android page says you can create blacklist files for different platforms including iOS:

https://docs.unrealengine.com/latest/INT/Platforms/Android/ReducingAPKSize/index.html#packageblacklist

There is no mention of this on the iOS page though:

https://docs.unrealengine.com/latest/INT/Platforms/iOS/PackagedGameSize/index.html

I can’t give you any kind of time frame as to when it will be available, but it is coming.

compress all images

thanks for suggestions., i am facing same problem

Hi ,

When I unzip my .ipa file and dive down to engine/content , I only find a Buid folder and not anything else.

Information on reducing file size for mobiles can be found here - Mobile Game Development | Unreal Engine Documentation

Try and start a new topic to get more feedback.