Reputation: 51093
The zip file I uploaded is 19.5MB, but on the App Store, Apple reports it as 24.5MB -- too large for over-the-air downloading. Is Apple adding a 5MB wrapper? Decompressing and recompressing less efficiently? Using 815K "megabytes"?
Upvotes: 5
Views: 3209
Reputation: 12979
From Apple:
When your application is approved by Apple to sell on the App Store, it is encrypted for DRM purposes and re-compressed. When the encryption is added, the size of the compressed file will increase. The exact size of the increase will vary from app to app, however, the size increase can be large when the binary contains a lot of contiguous zeros. We are unable to guarantee the size of your file after the encryption has been added.
Source (Expand section View the file sizes of a build (iOS, tvOS))
Upvotes: 14
Reputation: 33592
Download the app from the App Store with iTunes. You should end up with a .ipa in ~/Music/iTunes/Mobile Applications
which is (hopefully) approximately what you get from the App Store. Check its size. You can additionally use something like unzip -Z myapp.zip
to check the compressed size of individual files (an .ipa is just a .zip).
If, as in FreeAsInBeer's answer, your executable's compressed size is increasing loads, then it might be worthwhile trying to fix this (5 MB is a lot of code). Compiling with -Os
might be helpful.
Also note that the .ipa will have some additional info, namely iTunesArtwork (from the up-to-512x512 App Store app icon) and iTunesMetadata.plist (which has stuff like the App Store category) and some FairPlay information. I'm not sure which of these are sent to the device.
And finally, Apple might be using M = 106 instead of 220 — 19.5×220 ≈ 20.4×106 . IIRC this was one of the changes in Snow Leopard.
Upvotes: 2