John Alexander
John Alexander

Reputation: 241

What is the maximum sandbox size on iPad?

I'm writing an iPad app that acts as a media player (video and photos). I know there is a 2GB size limit on apps, however is this the size limit on an app when downloaded? Or the limit on the size of your sandbox throughout the life of the app? For example what if my small app later on downloads various media files to its sandbox that put the user over 2GB total (app + downloaded media)?

Thanks!

Upvotes: 24

Views: 8114

Answers (4)

Danra
Danra

Reputation: 9906

IIRC, Apple limits size of d/led applications to 20MB.

Upvotes: -1

Ansari
Ansari

Reputation: 1935

Sandbox size is unlimited, According to the iPhone Application Programming guide:

To manage program memory, iPhone OS uses essentially the same virtual memory system found in Mac OS X. In iPhone OS, each program still has its own virtual address space, but (unlike Mac OS X) its usable virtual memory is constrained by the amount of physical memory available. This is because iPhone OS does not write volatile pages to disk when memory gets full. Instead, the virtual memory system frees up volatile memory, as needed, to make sure the running application has the space it needs. It does this by removing memory pages that are not being used and that contain read-only contents, such as code pages. Such pages can always be loaded back into memory later if they are needed again.

If memory continues to be constrained, the system may also send notifications to the running applications, asking them to free up additional memory. All applications should respond to this notification and do their part to help relieve the memory pressure. For information on how to handle such notifications in your application, see “Observing Low-Memory Warnings.”

Upvotes: 0

jamone
jamone

Reputation: 17421

I did a little test last night, and my sandbox was over 8 GB when I finally called it quits.

Upvotes: 9

rpetrich
rpetrich

Reputation: 32326

There is no limit to the size of your sandbox other than the remaining capacity of the device itself.

Upvotes: 34

Related Questions