Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum size for iOS app

I've read in apple's dev guide there's a limit for iOS app size, but I don't really understand it. It says this:

iOS apps can be as large as 2 GB, but the executable file cannot exceed 60 MB.

Isn't the executable file the whole app? I don't understand the difference between the 2 GB limit and the 60 MB limit.

like image 862
Aviv Ben Shabat Avatar asked Oct 28 '13 22:10

Aviv Ben Shabat


1 Answers

The main part of the app is without a doubt the executable file. The executable is usually not very large, because it's just the compiled code that the machine runs. In small, trivial, apps, this is usually only a few kilobytes (KB). In more complex apps it can make it up to a few megabytes (MB). When compiling for multiple architectures the size of your app will inevitably increase (see my question on app size when compiling for 64-bit iOS devices).

Generally (not always), the bulk of your app's size is composed of interface files, images, videos, sounds, resources, etc. In other words, no, the executable is not the whole app.

Open up any app (in some kind of file viewer) and take a look at it's contents, it has four folders:

  • The bundle - with the executable and resources
  • The documents folder - which can also take up substantial space
  • The cache and temp directories

Many games are very large in size, Infinity Blade for example is about 1.2 GB for the initial download. But Infinity Blade's size is because of the copious amount of images / graphics, not the executable.

I think that Apple is trying to prevent malicious software and iOS / Device memory limits. Honestly, I think it'd be very hard to get the executable itself above 60 MB. Like I said before, the bulk of app size is comprised of resources.

You may also want to refer to the iTunes Connect Guide here.


iOS 8 Update

The app bundle file structure and sandboxing system has changed in iOS 8 (slightly). Therefore, some of the information about the structure of the app bundle (above) may be incorrect for iOS 8.0+. However, iOS will still calculate the size of each of these items and count them as your app's size.

For example, in iOS 8, your app's documents may not be stored within your app bundle, however they still count towards the total storage space used by your app.

like image 94
Sam Spencer Avatar answered Oct 18 '22 00:10

Sam Spencer