Maria Camila
Maria Camila

Reputation: 151

Unity iOS App Size weighs 1.2GB (real size) (Android 100MB)

I have an app, that is made with unity 2d. Exporting it to android it weighs 100MB. Exporting it to iOS weighs 1.2GB (ipa is 104MB), but inside iTunes weighs 1.2GB, which is too much.

We tried to reduce the texture size, but then, images get very pixelated on the device.

Any ideas on how to fix this?

Here is what the .ipa uncompressed shows what is getting all the MB:

sharedassets4.assets (just that file, gets 342 MB)

Upvotes: 6

Views: 2201

Answers (3)

JeanLuc
JeanLuc

Reputation: 4903

iTunes shows the installation size, so if you unzip your ipa file, you will get those 1.2GB. The install size on Android could also that big. Did you check that?

Usually this happens when you compressed your texture in True Color or 16 bits and the zip compression works really well i.e. on textures that have a lot of pixels with the same colors.

Possible Solutions

1) if your textures don’t require transparency, you could switch to compressed Textures (PVRTC on iOS and ETC on Android). But if the require transparency, you should not switch to compressed because transparent PVRTC can look very ugly and ETC does not support alpha.

2) I don’t know if it is possible in your project, but you could try to reduce the amount of texture by using tint or slicing them.

UPDATE 1

I currently having a similar situation and as it turns out.

 -------------------------------------------- 
| Platform                Android    iOS     |
|--------------------------------------------|
| APK/IPA                 380MB      400 MB  |
| unzipped APK/IPA        1.19 GB    1.13 GB |
| install size on device  380MB      1.15 GB | 
 --------------------------------------------

The difference is that iOS unzips the IPA file completely on installation and
Android contrary reads during runtime directly out of the APK, so you could argue, that is not really installed, but it is definitely another installation type.

Upvotes: 2

C0L.PAN1C
C0L.PAN1C

Reputation: 12243

Did you compress your meshes? Also strip bit code. Another thing I found helpful is flattening your textures, and removing layers. Also changing the indexed color count to a lower amount. For 1024x1024 it can get to 170KB, if you tweak it right.

Also remove normal maps, and change your shaders. It won't look as granular, but it'll reduce the size. You may want to offload the textures to an Assets Server, too and get textures at runtime as opposed to preloading them in your bundled assets.

Upvotes: 0

Almo
Almo

Reputation: 15861

Check your texture import options. You may have different options set for Android import and iOS import.

iOS import is usually PVRTC, which prefers textures which are a power of two in size and square (256x256, 512x512, etc).

It sounds to me like you might have iOS set to a non-compressed format.

Upvotes: 0

Related Questions