Unity Community |

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...Originally Posted by getluky
So the compressed zip should be the final size on the iTunes store?
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 AdvancedOriginally Posted by junkotron
Is there a Unity game out there that's less than 10mb?
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.
Dan Wilson
Founder, Battleknucks Software
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....Originally Posted by D22888
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.
EditPolyNC (3ds Max2011-2013): Caddyless EPoly recompiles Free DL (The Area)
PowerPreview (3ds Max): Quality Previews from Nitrous Viewports Free DL (ScriptSpot)
Josef Wienerroither | 3D & Coding Freelance | Tweak Freak
3ds Max | Unity Pro | Unity iPhone Pro | Unity Android Pro | C++ | C# | AS3
W7 x64 | Quad Xeon X3350 | 8GB | 275GTX | Mac Mini
Note: my website is a mess
I know apple has been working to improve their process of DRM.
I haven't complied an app recently, they may have improved it.
Dan Wilson
Founder, Battleknucks Software
Actually no...bliprob, above, already stated the formula for app size.Originally Posted by D22888
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.
--Eric
Here's an XCode Run Script build phase you can use to automate this:
Code:
#!/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:
1. Right-click on the "Unity-iPhone" target.
2. Select "Add -> New Build Phase -> New Run Script Build Phase"
3. Double-click the new "Run Script" item.
4. Set the shell to "/usr/bin/perl" and copy & paste the above text. It should look like this:
5. Build the project, and check the "Build Results" window for the script output.
For my current project, the results are:
Oh noes!Binary Size = 19.6145324707031 MB (20085.28125 KB)
Resources size zipped = 22.6994676589966 MB (23244.2548828125 KB)
AppStore size = 42.3140001296997 MB (43329.5361328125 KB)
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.
Dan Wilson
Founder, Battleknucks Software
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.Originally Posted by D22888
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.
--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
Dan Wilson
Founder, Battleknucks Software
Correct.Originally Posted by D22888
The zip file that you upload includes the binary and all the resources.
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.There is nothing else to add except DRMat that point
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
Dan Wilson
Founder, Battleknucks Software
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
Dan Wilson
Founder, Battleknucks Software
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.Originally Posted by D22888
I believe we are saying the same thing, my point was that with unity the executable is always the same size
Those files don't really add anything to the size, and the executable is not unchanged. Try zipping it, and you'll see:Originally Posted by D22888
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...
--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?