I’ve tried endlessly, (Yes I’ve tried everything in the apk package reduction document thread many times). Changed to blank projects, converted to C++, removed every reference and unused asset in the game.
Is there any way to reduce the engine content to a bare minimum in addition to the blacklist to get this to have a lower file size?
Could you package one arm instead of both of them?
If someone could show everyone how to did this it would be HUGE for mobile development for iOS with UE4.
Essentially, many people want to download our games at the click of a button. If they aren’t connected to wifi, they have to wait till they can to download it. Lowering our file sizes would increase downloads, and profits for every indie developer in the unreal community.
In your project’s target.cs file, make your SetupGlobalEnvironment() function look like this:
public override void SetupGlobalEnvironment(
ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration,
ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration
if (Target.Platform == UnrealTargetPlatform.IOS)
// to make World Explorers as small as possible we excluded some items from the engine.
// uncomment below to make a smaller iOS build
UEBuildConfiguration.bCompileRecast = false;
UEBuildConfiguration.bCompileSpeedTree = false;
UEBuildConfiguration.bCompileAPEX = false;
UEBuildConfiguration.bCompileLeanAndMeanUE = true;
UEBuildConfiguration.bCompileForSize = true;
UEBuildConfiguration.bCompilePhysXVehicle = false;
UEBuildConfiguration.bCompileBox2D = false;
UEBuildConfiguration.bCompileCEF3 = false;
Also, keep in mind that the download is going to be ~40MB smaller for iOS 9 users due to app thinning. The IPA generated by UE4 is universal and contains both 32-bit and 64-bit binaries, but iOS 9 will only download the one the device can run.
Thanks for sharing this manoelneto! I’d like to ask, how can you be certain these Engine items are not being used in your game? Is there a proper way to check and confirm before doing this?
I ask because I’ve followed the package slimming documentation before and found that whilst blacklisting certain things are fine when on Android, they will cause the game to break on iOS despite the base of the game being exactly the same for both platforms.
The names of some of those settings should give some hints to what they are going to cut. Box2D is 2D physics, PhysXVehicle is vehicle physics, Recast (I think) is used for runtime collision generation (I think you need it if you have dynamically generated splineMeshComponents) and CEF is the Chromium browser used by the browser UMG widget (not used on iOS). SpeedTree is only good if you license SpeedTree and APEX is for GPU cloth, which doesn’t work on mobile anyway.
Both Apple and Google have drawn a line at the 100 MB mark, but with different limits: iOS games aren’t limited in size, but games that exceed 100 MB can’t be downloaded over a cellular network, just wifi. Android games are limited to 100 MB and are forced to store additional assets in Expansion packs. Oddly enough, those get downloaded at the same time on most devices.
I’m also trying to pack my game in 100mb I was getting closer at 150mb in 4.13 and then I upgraded to 4.14 and now the ipa is 230Mb!!! My game is a ball floating in empty space with some particles why is so heavy?
So far I tried:
To delete anything beyond the files used
To set up in settings/ packages only the basic maps.
Build using the Project Launcher
Its there a way to see files size contribution to the ipa?
update: I cut closer to the original size in 4.13 my removing armv64 for iOS and keeping only armv7, now the ipa is 175Mb… still too big : /