iOS build sizes

Hey guys I just released my game “Finger Jets” to iOS and Android.

The android build is less than 50 mb, but the iOS build is more like 230mb.

Is that normal? Does anyone else have a multi platform build? What is the expected size difference with 2017.4?

I’ve looked through this Unity - Manual: Optimizing the size of the built iOS Player but since I’m using IL2CPP there aren’t really any tips I can see to action.

Same with Unity - Manual: Reducing the file size of your build, it talks about using .NET 2.0 which I can’t seem to set. Is that still an option in 2018? My project is using 4.6 and won’t seem to let me go lower. I am using the System.xml.dll it mentions but it says that only adds like 1mb which I’m not really worried about.

The build statistics don’t really say where most of the usage is coming from, it seems to be missing 90% of the data:

22781: [Unity] Build Report
22782: [Unity] Uncompressed usage by category:
22783: [Unity] Textures      77.7 mb     10.4%
22784: [Unity] Meshes        0.0 kb     0.0%
22785: [Unity] Animations    95.4 kb     0.0%
22786: [Unity] Sounds        1.9 mb     0.3%
22787: [Unity] Shaders       964.0 kb     0.1%
22788: [Unity] Other Assets  707.1 kb     0.1%
22789: [Unity] Levels        10.5 mb     1.4%
22790: [Unity] Scripts       402.0 kb     0.1%
22791: [Unity] Included DLLs 329.5 kb     0.0%
22792: [Unity] File headers  116.3 kb     0.0%
22793: [Unity] Complete size 750.0 mb     100.0%

There’s obviously some opportunity to reduce usage from textures, but I feel like that’s not going to give me the big win I’m looking for , not sure where else to start looking.

1 Like

I did a test with an empty project, with literally nothing in it but 1 empty scene.

Built on Unity Cloud Build with 2017.4.1

1054: [Unity] Build Report
1055: [Unity] Uncompressed usage by category:
1056: [Unity] Textures      0.0 kb     0.0%
1057: [Unity] Meshes        0.0 kb     0.0%
1058: [Unity] Animations    0.0 kb     0.0%
1059: [Unity] Sounds        0.0 kb     0.0%
1060: [Unity] Shaders       16.4 kb     0.0%
1061: [Unity] Other Assets  1.8 kb     0.0%
1062: [Unity] Levels        5.0 kb     0.0%
1063: [Unity] Scripts       659.0 kb     0.1%
1064: [Unity] Included DLLs 0.0 kb     0.0%
1065: [Unity] File headers  17.0 kb     0.0%
1066: [Unity] Complete size 584.7 mb     100.0%

Final output size: 138.4 mb

So you take that with my textures and it’s pretty close.

Default player settings of Scripting Runtime .NET 3.5 with api compatiblity level .NET 2.0 subset.

But 138 mb for an empty scene? Is that really the bare minimum? Those other docs were saying it was like 22mb.

EDIT: Same project on latest 2018.2 goes up to 147.47mb

Guess these big build sizes are expected.

There’s a world of difference between the build size that Unity spits out and the eventual final iOS build that is deployed on the device before compilation.

In my case, Unity produces a 950mb iOS build that, when released to the app store, is only around 70mb. In contrast, the Android build is around 50mb. So don’t panic until you’ve actually compiled the app and tested it via Testflight.

P.S. I don’t know anything about your game, but 70mb can be a lot for textures. Are you using sprite atlases and, if yes, are you compressing them?

1 Like

My 235mb build output is on the store and only went down to like 195mb , when the android is only 45mb

I’d suggest using texture compression and see where that gets you. I used 2017.2 to launch my first game, and that one I could get down to 60-75mb, depending on how much compression-related loss I was willing to tolerate. In other words, 150mb is definitely not the minimum size.

I set the scripting runtime to 4.x-equivalent, backend to IL2CPP, minimum iOS version to 8.0, and script call optimization to “fast but no exceptions”.

hi!

you can calculate more accurate build size using the steps in paragraph
Getting an App Size Report here. This is as accurate number as you can get without publishing

1 Like

Those build statistics are clearly wrong though. Those sizes don’t add up to the complete size, and the percentages don’t add up to 100%. The log should look something like this:

Textures      32.8 mb     76.6%
Meshes        0.0 kb      0.0%
Animations    160.6 kb    0.4%
Sounds        1.6 mb      3.7%
Shaders       55.2 kb     0.1%
Other Assets  2.6 mb      6.1%
Levels        387.2 kb    0.9%
Scripts       1.2 mb      2.8%
Included DLLs 3.9 mb      9.2%
File headers  75.7 kb     0.2%
Complete size 42.8 mb     100.0%

Maybe there’s something wrong with how UCB reports that information from the log? You could try building for iOS on your own machine if you have a Mac.

-Sam

I’m seeing the same issue, after moving from Mono to IL2CPP we have a 70mb Android .apk and a 130MB (App store compressed size). The extracted size is 300MB and that is what is shown on the App Store page :frowning:

@Jonas_Sid There is a serious issue with Current LTS version 2017.4

I have invested some time to compare my project. Here are logs for 2017.4 LTS vs 2017.2.0p3 There is a 0.5GB difference on same project.

size on 2017.2.0p3 - 237.1 mb
size on 2017.4.0f10 LTS - 887.5 mb


over 500mb from thin air. Editor log does not indicate where this extra build size is coming from

1 Like

I have the same issue that the listed category size in total is not equal to the completed size. The percentage sum up is not equal to 100% either. The difference is around 600MB. Does any one know what could this 600MB be?
Cheers

3666910--300436--Screen Shot 2018-09-11 at 8.29.57 pm.png

Same issue.

iOS -

Build Report
Uncompressed usage by category:
Textures 17.0 mb 2.7%
Meshes 0.0 kb 0.0%
Animations 4.9 kb 0.0%
Sounds 547.9 kb 0.1%
Shaders 15.6 kb 0.0%
Other Assets 237.0 kb 0.0%
Levels 63.2 kb 0.0%
Scripts 399.6 kb 0.1%
Included DLLs 0.0 kb 0.0%
File headers 28.0 kb 0.0%
Complete size 632.2 mb 100.0%

Tried building with empty project as well, yet the complete size was over 600 MB!
Unity Version - Unity 2018.1.0f2 Personal(64bit)
Building on mac.

After completing the build for release I realised that the above values do not determine the final size of the ipa and apk. As you can see -

https://itunes.apple.com/app/id1431764625

https://play.google.com/store/apps/details?id=com.ResurgeLabs.ChasingStars

My final game both on android and ios were less than 100 mb. So all satisfactory and as expected. Hence my previous comment concern was not an issue

Just set Compression Method to LZ4HC & see the magic. It compress almost 100 MB of build size.
Thanks me later. :wink:

2 Likes

Hello, I’ve been having similar problems with Unity 2019 iOS builds (up to the latest 2019.3.0f3, using URP).

As far as I’ve figured it out there seem to be a couple of problems we’re currently seeing at the same time:

  • Unity seems to add a lot of extra stuff, bloating the build report size, that then goes away when repackaging and recompressing the app in XCode. So the total build size in the build report for iOS builds doesn’t seem to really matter, or reflect anything useful. Though the asset type totals etc are still useful.
  • On top of this it seems that Unity is failing to strip some unused resources linked to the new render pipeline and including them in the build and actually affecting the end size (internal shaders and textures), which now makes the base size of a finished app about 50MB instead of the 22MB cited in the documentation. Not sure if this is intentional/expected or a bug.

Still having trouble with this in 2019.2.9f1

Don’t quite understand where this file size is coming from:

Build Report
Uncompressed usage by category (Percentages based on user generated assets only):
Textures 11.6 mb 50.2%
Meshes 0.0 kb 0.0%
Animations 4.0 kb 0.0%
Sounds 0.0 kb 0.0%
Shaders 36.4 kb 0.2%
Other Assets 7.0 mb 30.5%
Levels 95.0 kb 0.4%
Scripts 600.9 kb 2.5%
Included DLLs 3.7 mb 16.1%
File headers 41.6 kb 0.2%
Total User Assets 23.1 mb 100.0%
Complete build size 910.1 mb

The math on this doesn’t add up. In the build, the Libraries\libiPhone-lib.a is nearly 600MB on it’s own. I am building in Release with LZ4HC enabled.

I understand the resulting app will be smaller, but I am attempting to use Visual Studio App Center to build, which requires the project to be in a Git branch. A 500+MB file does not jive with most source control systems.

Any thoughts?

1 Like