Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

iOS Build Sizes Suddenly Doubled?

Discussion in 'iOS and tvOS' started by backwheelbates, Mar 4, 2019.

  1. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    231
    Hi,
    Just noticing that suddenly versions of my app that have been submitted to the app store are now nearly double the size as they were before last fall. "Compressed File Size" for a build was 281 MB, now rebuilding and uploading the exact same version it shows as 494 MB in App Store Connect.

    I did see the thread about changes in Memory Usage. Although this doesn't address the build sizes suddenly changing.
    https://forum.unity.com/threads/ios-large-memory-usage-apparently-feature-not-a-bug.637660/

    Anyone else know whats happening with this? or know of a fix?

    Thanks!

    Eric
     
  2. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    231
    I started doing some digging and I have the app archives to inspect. It looks like this is one of the files that has significantly changed between now and December. Keep in mind this is the same version of the app, just a new build. Does anyone know much about resS files and why they have suddenly become so much larger?
    Thanks!
     

    Attached Files:

  3. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    231
    Attaching the correct image:
    resFilesComparison.png
     
  4. jtokash

    jtokash

    Joined:
    Sep 1, 2013
    Posts:
    23
    Hi Eric - could it be the problem frozenpepper mentions in this post:

    We found out (the hard and long way) that upgrading from Unity 2018.1.x to 2012.2.19f1 we had more than 3x the ram usage on IOS 12 and 2.5X on IOS 11, leading to obvious crashes.
    In our case the main issue was due to some sort of bug with asset compression on Unity side, we had "Compress assets on import" disabled in the preferences, and while assets had already been compressed in 2018.1.x the newer version was instead ignoring the compression (on textures at least). Solution was to enable "Compress assets on import" and reimport all project (which wasn't fast), but now memory use is at least comparable to what we where used to.​
     
    backwheelbates likes this.
  5. TheJimz

    TheJimz

    Joined:
    Jun 26, 2015
    Posts:
    50
    There's a known bug that if you are using a cache server and build bundles, compressed or not, the asset will reference the cached version which may be uncompressed and use that in the bundle. It's best to leave 'compress assets on import' enabled for any machine that is creating builds.
     
    protopop likes this.
  6. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    231
    Thanks so much @jtokash, that was it.

    Also, @TheJimz I wasnt actually using a cache server or build bundle.

    FYI, this is using unity 2018.2.16f1 so Im not sure if this bug has been fixed since.

    From the docs:
    https://docs.unity3d.com/Manual/ReducingFilesize.html
    By default, Unity compresses all Textures when importing. For faster workflow in the Editor, go to Unity < Preferences and untick the checkbox for Compress Assets on Import. All Textures are compressed in the build, regardless of this setting.

    There was never an indication that this setting had any affect on actual builds. So I would have never figured this out if it wasnt for your suggestion @jtokash. I hope that Unity can make sure this is working in future builds or at least update the documentation to better explain how this feature can be used.
     
    protopop likes this.