Firstly, I’m a little confused on what the final size on the App Store will be. In another thread I was told: “to get its real size, you need to move out the actual binary from the app package and then compress the rest. then sum up the size of the binary + compressed app”. Some searching said the binary is the compressed .app. So then what is the compressed app?
Onto my main question. What makes the app the size it is? It would be useful to know what causes the app to grow so that I can minimise it.
My current project is a 3D arcade game. After some more work, my .app is down to 25.1 MB, 7.9 MB compressed. I’m using the standard iPhone Unity 3 beta 5, so no build stripping. Target Platform is set to arm6 only (otherwise the .app grows to over 40 MB), and Api Compatibility to .NET 2.0 Subset (Unity will not accept 1.1).
For background, my textures total 250 KB (3 256x256 .png atlas textures). I have fonts totalling 279 KB (1 font at 2 sizes). Models total 774KB (7). My Prefabs folder is 381 KB (29). Scripts 143 KB (25), and 3 Scenes totalling 78 KB.
For example, I have 3 atlas textures so that I can use models up to 3 times because I have a different set of suitable images in the same place on all 3. Do I get a benefit from reusing a model? Or do the files include an instance for each time it is used?
Is there any particular coding that will cause the app to grow quickly? For example, all my scripts are 4 KB, except for the main game state file, which is 37 KB. Much of that is taken with the data for the levels, which are called on a switch statement. Does a large switch statement really bloat my app?
I realise this could be a bit vague, but I’m hoping someone will share some examples of what they found enlarged their apps.