Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Strange difference in size of unity game after installation.

Discussion in 'iOS and tvOS' started by rafimagsi, Oct 27, 2014.

  1. rafimagsi

    rafimagsi

    Joined:
    Oct 27, 2014
    Posts:
    14
    My game ipa size is 341 MB, but when I install it on device this becomes 1.1GB which is strange. I know apple applies some type of encryption when we upload our app to appstore, but without uploading to appstore when I directly install my app on IPad with XCode it shows me 1.1 GB on IPad. I have read many docs to reduce the size of ipa but nothing happens. Also the size of installed game on Android and Windows mobile is around 360 MB, but IOS is taking a huge part of the memory after installation. I don't know whats going on the back side.
    How unity works with IOS? Does unity needs more supporting code or libraries to run on IOS?
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    It's compressed when uploaded to the store (ipa is basically a zip file), and uncompressed when stored on the device. So it's not actually strange, but expected.

    --Eric
     
  3. rafimagsi

    rafimagsi

    Joined:
    Oct 27, 2014
    Posts:
    14
    Yea that's fine but why the installed application size over Android remains the same (i.e. 341MB). Important thing to note here is that the android binary before installation is also 341MB
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    I would assume that Android apps are still compressed on the device after installing, then.

    --Eric
     
  5. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,033
    I get smaller sizes from Android builds than iOS builds, but never that extreme! For that ratio the build needs to be very small, otherwise it's more like a 20-30MB difference. Android and iOS needs roughly the same size of supporting files, but the binary (a little over 20MB of the app) is uncompressable on iOS after encryption.

    Android got some of the newer texture compression formats before iOS, which Unity also supported for Android only until recently. I think you still won't get the latest ones without building with 5.0 betas, so that could account for the huge difference. Still seems a bit extreme to have about 700-800MB difference.

    Unity's asset format is all LZMA compressed, so it should really be the same or similar on iOS also. The IPA doesn't really change the size of Unity apps much at all. Only signatures, a few plists and app icons/splash screens are extracted. I'd like to know what happened to that iPad version too :)
     
  6. rafimagsi

    rafimagsi

    Joined:
    Oct 27, 2014
    Posts:
    14
    #Eric
    No, Installed apps on Android are not compressed. They are all in the form which is ready to run.
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    Only for webplayer builds; standalones for example have no compression, aside from hardware texture formats (DXT) and audio (OGG). Find any .assets files from installed Unity games, and you can typically compress them down by a lot.

    --Eric
     
  8. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,033
    Ah, that's right. Then I guess it's model data that makes up the bulk of the uncompressed data.
     
  9. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    Model data is relatively insignificant; textures usually make up the bulk of the data, and hardware compression formats such as DXT can still be zip-compressed by quite a bit.

    --Eric
     
  10. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,033
    Bah, stupid 90s texture formats :p

    Not much to do for the iOS case then, other than waiting for newer Unity versions and releasing only for the latest devices. Which is still probably not a great idea.