Ok, I know this topic has been beat to death but I’m not so worried about getting it under 10 but I really want to know how to check the size of the game before it’s on the app store.
Thanks,
-Mike Berger
Ok, I know this topic has been beat to death but I’m not so worried about getting it under 10 but I really want to know how to check the size of the game before it’s on the app store.
Thanks,
-Mike Berger
The size = the size of the app binary (the file that ends in .app) + the rest of the files in the app bundle compressed with zip.
So the compressed zip should be the final size on the iTunes store? That doesn’t seem to be what happened to me - I was at 9.9MB after compressing on my own machine, but on the App Store it shows up as 19.1 MB. I figured that Apple decompresses and then recompresses using a different algorithm, but it was just a guess. Are you saying that your submitted compressed binaries are what’s used in the final file size?
No…
Size = (size of app binary) + (rest of files compressed with zip)
–Eric
Is there a Unity game out there that’s less than 10mb?
Ah, that makes sense. Thanks!
There are a few with Unity iPhone Advanced
With basic its impossible
My Game Marble Challenge is under 10MB.
Basically you need to have a 4.6MB zip file to get under 10MB
Apple adds DRM to your app.
Anything over 4.6MB zip = over 10MB in app store.
That’s not quite correct. This varies heavily, depending on coding&content in your app. I was able to release an app that was 6.2Mb after i zipped and sent it to apple. After they put their DRM stuff on it, the download size was just 9.7Mb…
I know apple has been working to improve their process of DRM.
I haven’t complied an app recently, they may have improved it.
Actually no…bliprob, above, already stated the formula for app size.
–Eric
Here’s an XCode Run Script build phase you can use to automate this:
#!/usr/bin/perl
my $binfile = $ENV{'CODESIGNING_FOLDER_PATH'}.'/'.$ENV{'PRODUCT_NAME'};
my $binSize = -s $binfile;
my $kbsize = $binSize / 1024;
my $mbsize = $kbsize / 1024;
print "Binary Size = $mbsize MB ($kbsize KB)\n";
$zipResult = `zip -r /tmp/tempAppZip $ENV{'CODESIGNING_FOLDER_PATH'} -x $binfile`;
$zipSize = -s "/tmp/tempAppZip.zip";
my $kbsize = $zipSize / 1024;
my $mbsize = $kbsize / 1024;
print "Resources size zipped = $mbsize MB ($kbsize KB)\n";
$finalSize = $binSize + $zipSize;
my $kbsize = $finalSize / 1024;
my $mbsize = $kbsize / 1024;
print "AppStore size = $mbsize MB ($kbsize KB)\n";
In XCode:
For my current project, the results are:
Oh noes!
The zip file you send to apple is all inclusive, the only thing they add is the DRM.
With Unity the only way to get it under 10MB is with unity Advanced.
If you build a completely empty unity iphone project with unity iphone basic and xcode the resulting app is 15.1 MB, that is just the size of the engine.
My game Marble challenge’s app is 17.4MB when that file is zipped it is 4.8MB the size of the game on the app store is 9.3MB.
The downloads on the app store are zip files. Apple adds roughly about 4.5MB of DRM to a unity game.
My game CRHM is 14.2MB and 4.3MB zipped. App store is 8.8MB
If you are using iphone advanced you can expect about 4.5MB of DRM added to a game. The DRM has nothing to do with the size of your content, it is just separate code/resources that apple adds before re-zipping the file for resale.
The app that results in the app store is not an executable, it’s a zip file, the iPhone uncompresses it when it gets downloaded.
The only way to keep the download under 10MB is to keep your zip file under roughly 6MB.
This is quite wrong. It’s very simple; bliprob already provided a more accurate answer and even made a nice automated way of doing it. Unzip the .ipa file that you download from iTunes and see for yourself. Hint: the actual executable compresses very badly after whatever Apple does to it, but everything else (data, assets, etc.) is the same.
–Eric
The zip file that you upload includes the binary and all the resources.
That is the complete file there are no other files included.
The “.app” produced by xcode includes everything.
There is nothing else to add except DRMat that point
Correct.
The only thing that’s touched is the executable, which is re-encoded with DRM. There is no “separate code/resources” added. Why don’t you just do what I suggest, unzip your .ipa file, and see for yourself? Continuing to argue about something so easily verifiable isn’t doing anyone any favors.
Since the executable doesn’t really compress much anymore after Apple touches it, the final size in the app store depends on the size of the executable to begin with. Everything else is identical and compresses as well as it did before. This is why the formula that bliprob originally provided works.
–Eric
I believe we are saying the same thing, my point was that with unity the executable is always the same size and the apple added drm works out to about 4.5 mb
the original poster asked about getting a unity game under 10mb on the app store.
As I said I posted different apps at different sizes and all of them had exactly 4.5MB of drm added, the unity executable doesn’t change size no matter what content you inclued unless you have advance to stip out uneccessary components.
So there is a limit to what you can add to keep the app under 10MB, with a unity executable compiled with advanced with maximum optimization you will always get 4.5mb I’d drm
Oh and I did unzip the IPA, there are several added files outside of the .app as well as 3 new files in the .app, but he executable was unchanged…
Like I said they add files to the .app and then stick that .app into a folder which goes into another folder with some other files they add and then zip the whole thing
The executable is not always the same size. It depends on what stripping level you use, and what features you use in your scripts. For example, doing something with System.Text.RegularExpressions will add about 170K to the executable with maximum stripping, and with no stripping it adds 3.7MB. Also it may become larger or smaller in the future depending on what UT does with it.
Those files don’t really add anything to the size, and the executable is not unchanged. Try zipping it, and you’ll see:
–Eric
I just tried Bliprod’s formula and it gave us a small heart attack. It doesn’t seem to be all that accurate from what I can tell but there is every chance we are doing something wrong in the calculation.
To validate I used an app that we already have on the app store to check.
I took the package generated by Unity, this was 14.5 meg in size.
I right clicked and ‘show package contents’ and copied everything in there into a new folder I created.
I then moved the .app executable file out of that folder which was (8.9 meg)
I then zipped what was left in that folder using standard OSX zip. (2 meg)
According to the formula provided, the size would be 8.9 meg + 2 meg = 10.9 meg, however on the app store its listed as 9.7 meg. Thats nearly an entire Megabyte different.
So, what did I do wrong?