Unity iOS Build size is way big

2020-02-13 02:32发布

问题:

Currently I'm on the verge of making a 2D puzzle game for iOS. When I zip my project it's size become 16MB approximately. When I build it in xcode the project size become 780MB and when I archive it then it becomes 1.5GB.

But the real problem begins when I upload it to test flight for internal and external testing then in iTunes connect it's compressed size became 143MB and Universal install size become 285MB and for different iPhone install size become 160MB in average. Now I think 160MB is very large install file for a simple 2D puzzle game and can cause major drop outs when I publish it.

Unity version: 5.4.2

Scripting backend : IL2CPP

Api compatibility Level: .Net 2.0 subnet

Can anyone tell me what can I do to solve this problem, or the size will reduce when I'll publish it.

Thanks in advance.

回答1:

To solve that (My app was 1.7 GB for iOS, while Android's apk file is just 50 MB) I changed the compression method for Unity build:

Build Settings -> Compression Method -> LZ4HC

Now it is just ~80MB (instead of 1.7 GB). Hope it helps someone.



回答2:

This is my checklist for reducing file size of APK I guess it applies to iOS.

  1. Removing duplicate or unused assets
  2. Reducing sprite sizes (power of 4 for iOS)
  3. Reducing SFX sample rate and bit rate (mono, vorbis, 44100)
  4. Using Texture Compression for sprites (16 bit is better. and disable mipmaps)
  5. Removing external assemblies (and most of .NET references)
  6. Using pngopt to strip out the unnecessary informations from PNG files