Maximum size for iOS app
Asked Answered
B

4

9

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.

Brendonbrenk answered 28/10, 2013 at 22:25 Comment(0)
K
13

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.

Kaitlin answered 28/10, 2013 at 22:35 Comment(3)
@Abs That's okay, there's nothing wrong with having a lot of resources in your app - as long as you don't pass the 2 GB limit. Keep in mind that your executable does not include any resources - its just the compiled code that the machine runs.Kaitlin
It's misleading to say that "your executable does not include any resources". Of course it is entirely normal to have initialized static data in C/C++/Objective-C code. (For instance, all string literals in your source code...) Sure, only in rare cases that would be so large to cause the executable to go past this 60 MB limit.Ranaerancagua
Overall, this answer is generalising way too much. "the compiled code that the machine runs - which is only a few KB" is maybe true for some trivial My First iOS App apps, but a serious apps with lots of source code (much of which might be totally platform-independent "business logic") will have megs of executable code.Ranaerancagua
S
1

February 12, 2015

The size limit of an app package submitted through iTunes Connect has increased from 2 GB to 4 GB, so you can include more media in your submission and provide a more complete, rich user experience upon installation. Please keep in mind that this change does not affect the cellular network delivery size limit of 100 MB.

Strait answered 14/12, 2015 at 12:26 Comment(1)
On September 19, 2017 Apple has increased the cellular download size limit to 150MB. See: developer.apple.com/news/?id=09192017bMeier
G
0

No, you can add data to the app post installation. For instance, the app could simply display stuff from a database, like say a dump of wikipedia. The space you app executable would require would be small, but you could reach the 2GB limit with the database.

Glindaglinka answered 28/10, 2013 at 22:28 Comment(2)
I don't think you're quite right there. Many games exceed (well over) the 60 MB standard (ex. Infinity Blade is about 1.2 GB for the initial download). And although you're right about downloading content - that only works to an extent (only certain types of content).Kaitlin
@RazorSharp you are correct, I wasn't trying to say that you had to limit your initial download to under 60MB, I was just trying point out the difference between the excitable and the space that the application takes as a whole. I'll edit my post to make it more clear, though your answer was much clearer.Glindaglinka
P
-6

Your IPA file size should not exceed more than 60 MB. If it exceeds 60 MB, you require special approval from Apple. Apple believes core logic of your code may not exceed 60 MB and the resources bundles can also be downloaded over the air as required, if your app supports multiple languages.

Over the air (over cellular not wifi) network limit is 50 MB. If your app is more than 50 MB you will get a warning that you will require a wifi connection to download the app.

The max size of an IPA file can be 2 GB, but Apple recommends to keep the file size not more than 50 MB due to OTA download.

https://developer.apple.com/library/mac/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/18_BestPractices/BestPractices.html

Pereira answered 28/10, 2013 at 22:54 Comment(2)
This is wrong.. The IPA can be up to 2GB. The binary inside that IPA can't be more than 60MBPatience
Though you added some correct information, there is still incorrect information in the first sentence. I haven't removed my downvote yet.Patience

© 2022 - 2024 — McMap. All rights reserved.