Reputation: 40196
From Max size of an iOS application I came to know that a typical iOS application binary can be up to 2GB. However, the executable file limit is 100MB. What is the maximum heap limit for a typical iOS application? It would be great if one can let me know the heap/ data segment/ code segment limits too.
Is there any restrictions from Apple?
Upvotes: 1
Views: 1930
Reputation: 1136
As @gnasher729 said,
Your application will be killed if it uses too much RAM.
There is no absolute-hard limit on RAM usage in iOS. But Apple does provide the methods applicationDidReceiveMemoryWarning
and didReceiveMemoryWarning
for the UIApplicationDelegate
and UIViewController
, respectively. Implementing those methods will let you know when Apple is about to kill your app unless you reduce your memory usage (quickly). Here's some documentation regarding these:
App Programming Guide for iOS: Performance Tips.
Upvotes: 5
Reputation: 52548
Your application will be killed if it uses too much RAM. It may cause other applications to be killed as well. So don't ask for any limits, get an iPhone 4s and make sure your app runs fine on it. You won't be making friends by using too much memory.
Upvotes: 3