Search Unity

Why does .ipa and itunes report over 300 MB difference in app size?

Discussion in 'iOS and tvOS' started by RyanZimmerman87, Dec 22, 2013.

  1. RyanZimmerman87

    RyanZimmerman87

    Joined:
    Dec 4, 2012
    Posts:
    53
    So my .ipa is 188.9 MB on disk when using the right-click "Get Info" option.

    The "Estimated App Store Size" of the Archive is 200 MB which corresponds pretty accurately to the .ipa file

    But when I load up the .ipa file into Itunes which is the recommended way to install their apps for any test devices with their adHoc Provisioning profiles, the install size is 508.4MB?

    Why is there a 300 MB difference in Itunes compared to the actual .ipa size and the xCode archive estimation size?

    The actual Xcode folder in the Unity project directory is 840.5 MB.

    Why in the heck am I getting so much variation here and why are these files so dang huge?

    I have tried to completely delete all the Xcode stuff from the project after backing up my previous version.

    I am getting these exact results even with only building the Xcode project once in Unity, making a new Adhoc Provisioning profile, archiving the build, and distributing it.

    I also deleted the project from my iPad of course before doing any of this and it's still saying 508.4MB in Itunes to install? It's like it's installing it twice with Unity and iTunes or something? Is this the expected behavior or am I doing something wrong even though I'm following the directions exactly and have tried to redo this multiple times?

    The more I work with Xcode and Apple products in general the more irritated this whole process is. With Android it creates a simple sweet little .apk at the push of the button which you are free to distribute and is completely logical.

    Why am I getting such insanely illogical results with iOS and Xcode?
     
    Last edited: Dec 22, 2013
  2. RyanZimmerman87

    RyanZimmerman87

    Joined:
    Dec 4, 2012
    Posts:
    53
    Update: K trying to do some more testing to figure this out.

    So if I add my first .ipa to the library which is 129.4 MB, it is 288.7MB in iTunes for the iPod to install.

    For my most recent .ipa which is 188.9MB, it is 508.4MB. So it's not even an even ratio of how much the file sizes are growing.

    60MB difference in .ipa is somehow translating to over 200MB in iTunes?

    The main difference in these builds is that in the new one I am trying out some higher quality texture settings. Can the new iPod Air not handle simple true color textures or something? I still don't understand why there is such a huge difference in file sizes here.

    Also am I doing something wrong if the .ipa's would have to replace the other one in the library? I'm getting this message:

    The app "name" already exists in your iTunes library. Do you want to replace it with the one you are moving? I'm getting this message when switching between .ipa files even when nothing is installed on the device...

    It seems like that would be the best behavior so you don't have multiple apps at once on your device, but I still just don't understand this.
     
  3. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    An app expands on the device as it is decompressed. Is this the difference you are seeing?
     
  4. RyanZimmerman87

    RyanZimmerman87

    Joined:
    Dec 4, 2012
    Posts:
    53
    I'm not sure the Xcode estimation is 200MB, 500+ MB seems pretty dang huge compared to all my previous builds. I'm looking at the .apk on my Android phone where it's already installed and it's 146MB.

    Really seems like something strange is happening here there is no way the game should be over 500MB this is about twice the expected size even with the improved texture quality.

    Gonna need to do some more investigation. Is Xcode supposed to do an estimation of size that doesn't relate to the size on the device? Seems strange to me since I could just do a right click "Get Info" on the .ipa file if that's all their estimation is doing?
     
    Last edited: Dec 23, 2013
  5. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    XCode is talking about the download size, not the size on the device. Once downloaded an app is decompressed onto the iPhone, so it's much larger than the .ipa. As for why it has the estimation, it's because Apple adds encryption to your app's executable when you upload it to the app store, which increases your game's download size a bit.
     
  6. RyanZimmerman87

    RyanZimmerman87

    Joined:
    Dec 4, 2012
    Posts:
    53
    K thanks for feedback! Still seems strange that the iOS size is so much bigger than my Android one, but perhaps this all just expected behavior with my project settings. Just wanted to make sure I wasn't doing something wrong.

    Will need to remove the majority or all of the non GUI true color textures I guess, this was more of a test run to add them to see file size and look for any performance changes on mobile devices, but 500 MB is far too large. I want it to be under 200MB like the .apk if possible.

    Looks like iOS just upped their max over the air download size to 100MB for iOS 7? Don't think I'll be able to reach that for the entire build.

    Anyone have any guides of how to do iOS builds so that you can have it be under 100MB for the initial file and they download the rest later? Still need to learn how to do that for Android too. Or is that only possible on Android?

    100MB still seems pathetically small to me given their new devices gaming capabilities and download speeds.

    Anyone with some nice links about any of this stuff like average app size, or guides for iOS apps would be very helpful! I'm sure stuff like that is all over the internet but maybe someone here has some nice bookmarks ready to share?

    Thanks for help everyone!
     
  7. SouthernCoder69

    SouthernCoder69

    Joined:
    Oct 23, 2013
    Posts:
    74
    Point to ponder - 100 meg over the air is very reasonable. Most data plans in the US for example are 2-4GB per month, and the carriers who work/fight/negotiate with apple reluctantly keep agreeing to up the limit (apple obviously doesn't really care) - it's the phone carriers who hate you using all their data :)

    Otherwise - did you check the debug console when you build for the size breakdown? Right click down in the console and you can get the console output that shows you each file and it's size to get the true .app size to tweak (if it's even possible..depends on your goals/design/etc).
     
  8. RyanZimmerman87

    RyanZimmerman87

    Joined:
    Dec 4, 2012
    Posts:
    53
    K thanks for tips! I didn't know you could use the console to see the size breakdown of everything in the build so easily. Not sure if there are many adjustments I can make other than undoing all the true color textures I recently wanted to test out instead of the compressed ones.

    I still feel like 100MB downloads is pretty weak and just because some people have 2-4GB limits per month doesn't mean they should just restrict everyone from using their devices. Wouldn't the phone companies love to have people go over their data limits so they can fine them and make even more money? Maybe their networks really can't handle this kind of bandwidth? I'm not sure, but I'm pretty sure I have an 8GB data plan and every time I check my monthly usage I never really go over 100MB even. It seems I always have wi-fi available, maybe some people don't have wi-fi access? Seems odd they would pay money for a smartphone before they would have internet access in their home. But anyways if I ever find myself with no wi-fi and I can't download any big apps I'm gonna be pretty pissed off that I can't download something more than 100MB when I have 7+ GB of data ready to go with my plan.

    These kind of data restrictions really seem like a marketing scheme to make a ton of money. I can't imagine this stuff will keep up forever unless they are just ripping us off forever. Some carriers are already doing unlimited data so hopefully that will eventually force everyone else to stop ripping us off.
     
  9. RyanZimmerman87

    RyanZimmerman87

    Joined:
    Dec 4, 2012
    Posts:
    53
    Hmm still seeing some very strange behavior with the Unity iOS stuff.

    So I'm looking at the iTunes Mobile Application folder since that is apparently the only way to delete the .ipa files from the device? So I got my .ipa down to 188MB. It is my only mobile application. Yet the iTunes iPad -> Apps page is still showing the installation size as 508MB?

    I already installed the 188MB version, and I've even uninstalled that version replugged the ipad several times, etc. It still says 508MB installation size when the actual .ipa file is 188MB. I expect the size on the device to be around 230MB since it seems like somehow 50MB is added to the Unity Editor Log size.

    This just seems really strange to me, everything seems to be working fine in the game but it's like iTunes cannot correctly recognize the current and only .ipa available.

    Do I need to completely redo the entire process for each and every build? By process I mean basically:

    1) Create a new provisioning ad hoc profile.
    2) Add all devices.
    3) Create a new archive.
    4) Close xCode and reopen it with new archive so it correctly updates provisioning profiles available.
    5) Finally build the .ipa

    I might be forgetting something this process still seems ridiculously unnecessary to me compared to Android. But do I have to do all that for iTunes to correctly recognize the new .ipa? Or is there some way I can avoid having to redo everything with like the Unity Editor Bundle Version or some kind of Xcode tricks?

    I'm the only one who actually adds things to our project the rest is sent to me from other team members so I don't really care about using different Bundle versions unless I have to for Xcode and iTunes to work as expected with my .ipa files?

    Really confused still why things are so awkward in iOS development.
     
    Last edited: Dec 27, 2013
  10. RyanZimmerman87

    RyanZimmerman87

    Joined:
    Dec 4, 2012
    Posts:
    53
    Wow so even after deleting the .ipa from the Itunes Mobile Application folder I'm still seeing the 500MB iOS installation taunting me in the iPad section haha?!

    How do I get rid of this damn thing, it's not the correct file and it should not be there? I want there to be no iOS apps ready to install for my device how can I do this?

    Edit: Ok so now at least when I try to install the 500MB app it says:

    The app "Star Legacy" was not installed on the iPad "name iPad" because the app could not be found.

    So at least I was able to delete it from being able to install so why is it still in the list?

    When I toggle the Install and Will Install button it goes from 7.48GB free to 10.68GB available on my iPad in the hard drive bar at the bottom of iTunes iPad section...

    So does this mean that not only is the 500MB app size incorrect for the .ipa and seems impossible to remove from the list but the actual size isn't even 500MB it's like 3+ GB???!!!

    Is it somehow combining every single build I've ever done or something into one? Someone has to know what's going on here this is straight up stupid haha.

    All I want to do is just have my iOS builds automatically overwrite the old ones and be useable for a fresh .ipa whenever I need when I create a new archive. Is this not possible, do I have to constantly be tinkering and wasting time to just get my file to work correctly? Why no one click .apk like Android sooo much better.
     
    Last edited: Dec 27, 2013
  11. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Have you actually read the official iOS documents about publishing or archiving versions? half of the stuff you say in your posts are something you should not need to mess with after first setup on at all. Also comparing file sizes to android version wont work due different texture formats, linking requirements etc, its not 1:1, not even close sometimes
     
  12. RyanZimmerman87

    RyanZimmerman87

    Joined:
    Dec 4, 2012
    Posts:
    53
    Yeah I've done my best to read it but there are like 100 sections and each section has like 10 subsection, etc. It's basically way too much to take it all in. I've only been programming for about a year and I am completely self taught I don't do well with documentation especially stuff like iOS and Xcode when their whole system seems incredibly excessive with all the unnecessary things they force you to do. These things seem unnecessary since Android doesn't have any of that nonsense.

    Any examples of what I said that I should not need to mess with?

    I'm looking for solutions here so far I haven't gotten any.
     
    Last edited: Dec 28, 2013
  13. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    There is tons of official documentation but there is also tons of short tutorials created by iOS community (no need to be Unity specific). I'm still not sure what are you trying to do at this point? test your app on your own device and replace it every time with a new version? or are you about to publish something?

    http://unity3d.com/learn/tutorials/...m-specific/how-to-submit-to-the-ios-app-store


    Yeah it's easier with Android but so is piracy, app clones and other malware too :)
     
  14. RyanZimmerman87

    RyanZimmerman87

    Joined:
    Dec 4, 2012
    Posts:
    53
    So part of the problem is that I've never used Apple computers at all really my whole life. So I eventually figured out how to remove the old 500 mb .ipa from my iPad's app list.

    So my confusion that caused me to start this post was just as much based on iTunes being kinda awkward to figure out then anything Xcode or Unity related :(

    It seems like Apple tries to make things so simplified with there designs that coming from Windows it actually makes it very difficult when options are missing in the place it seems like they should be. Like in iTunes the only way to delete the app from the list was in the "Library" menu on the left which somehow was not visible in my iTunes that can't possibly the default layout to not have that?? Not sure why mine was like that... So instead of being able to just click the app from the iPad section and delete it directly I had to change the iTunes view options to "Show Sidebar" to even get to that...

    I donno just seems awkward to me with how they hide such useful options in such strange places.

    Same thing for the iPad. When you go into settings and press General than you click on "About" it lists all kind of stats like hard drive capacity and available, apps, etc. But tapping those does absolutely nothing. Instead all that useful information is hidden way down in the "Usage" section which is practically off the screen in landscape view.

    So now I that I know how to remove old .ipa's from iTunes app list on my iPad I think I understand this whole process for the most part, that was really causing me to think all kinds of weird things were going wrong with my project.

    Gonna give a try with just doing new builds/archives with the same provisioning profile, see if it works as expected.
     
  15. bug5532

    bug5532

    Joined:
    Aug 16, 2011
    Posts:
    307
    Any luck finding out what causing the huge decompressed size? I've got a 61mb .ipa that once in itunes is over 650mb. 10X increase seems a bit ridiculous....
     
    Menion-Leah likes this.
  16. Agent_007

    Agent_007

    Joined:
    Dec 18, 2011
    Posts:
    899
    What kind of assets you have in your project?